From 6b7e2139641fff3085d15ed9c60c6c78025faf7d Mon Sep 17 00:00:00 2001 From: Alexander Kozlovsky Date: Mon, 21 Feb 2022 08:40:13 +0100 Subject: [PATCH] Fixes #6777: remove path existence check to not trigger PermissionError in on_save_resume_data_alert --- .../components/libtorrent/download_manager/download.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tribler-core/tribler_core/components/libtorrent/download_manager/download.py b/src/tribler-core/tribler_core/components/libtorrent/download_manager/download.py index 8d7453edc90..55517c0162f 100644 --- a/src/tribler-core/tribler_core/components/libtorrent/download_manager/download.py +++ b/src/tribler-core/tribler_core/components/libtorrent/download_manager/download.py @@ -277,8 +277,7 @@ def on_save_resume_data_alert(self, alert): # Make save_path relative if the torrent is saved in the Tribler state directory if self.state_dir and b'save_path' in resume_data: save_path = Path(resume_data[b'save_path'].decode('utf8')) - if save_path.exists(): - resume_data[b'save_path'] = str(save_path.normalize_to(self.state_dir)) + resume_data[b'save_path'] = str(save_path.normalize_to(self.state_dir)) metainfo = { 'infohash': self.tdef.get_infohash(),