From edbeec5e2a37083ccebb5381ba5e69494136c2ab Mon Sep 17 00:00:00 2001 From: bobokun Date: Fri, 20 May 2022 17:19:41 -0400 Subject: [PATCH] potential fix for windows --- modules/qbittorrent.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/qbittorrent.py b/modules/qbittorrent.py index 70cb4f8..5fbc479 100644 --- a/modules/qbittorrent.py +++ b/modules/qbittorrent.py @@ -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)