mirror of
https://github.com/logos-storage/bittorrent-benchmarks.git
synced 2026-01-04 05:53:12 +00:00
prevent double delete in torrent cleanup
This commit is contained in:
parent
ab0abbd4b5
commit
3a69ac88bc
@ -68,8 +68,10 @@ class DelugeNode(SharedFSNode[Torrent, DelugeMeta], ExperimentComponent):
|
||||
raise Exception(f'There were errors removing torrents: {errors}')
|
||||
|
||||
# Wipe download folder to get rid of files that got uploaded but failed
|
||||
# seeding or deletes.
|
||||
shutil.rmtree(self.downloads_root)
|
||||
# seeding or deletes. Check first or it may race with the remove_torrents
|
||||
# operation above.
|
||||
if self.downloads_root.exists():
|
||||
shutil.rmtree(self.downloads_root)
|
||||
|
||||
self._init_folders()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user