mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-10-10 22:06:58 +08:00
potential fix for windows
This commit is contained in:
parent
f0ce11572f
commit
edbeec5e2a
1 changed files with 3 additions and 0 deletions
|
@ -766,6 +766,9 @@ class Qbt:
|
|||
torrent_list = self.get_torrents({'sort': 'added_on'})
|
||||
for torrent in alive_it(torrent_list):
|
||||
for file in torrent.files:
|
||||
fullpath = os.path.join(torrent.save_path, file.name)
|
||||
# Replace fullpath with \\ if qbm is runnig in docker (linux) but qbt is on windows
|
||||
fullpath = fullpath.replace(r'/', '\\') if ':\\' in fullpath else fullpath
|
||||
torrent_files.append(os.path.join(torrent.save_path, file.name))
|
||||
|
||||
orphaned_files = set(root_files) - set(torrent_files)
|
||||
|
|
Loading…
Add table
Reference in a new issue