Skip to content

Commit

Permalink
Fixes #6777: suppress PermissionError in on_save_resume_data_alert
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlovsky committed Feb 21, 2022
1 parent 7e4844f commit 483a659
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,11 @@ 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))
try:
if save_path.exists():
resume_data[b'save_path'] = str(save_path.normalize_to(self.state_dir))
except PermissionError:
pass

metainfo = {
'infohash': self.tdef.get_infohash(),
Expand Down

0 comments on commit 483a659

Please sign in to comment.