mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-05 16:08:40 +00:00
try to prevent "lost data" by removing previous fastresume file prior to creating another
This commit is contained in:
parent
d071961473
commit
4238ac91a3
1 changed files with 6 additions and 0 deletions
|
@ -628,6 +628,12 @@ class Manager:
|
||||||
|
|
||||||
# save fast resume once torrent finishes so as to not recheck
|
# save fast resume once torrent finishes so as to not recheck
|
||||||
# seed if client crashes
|
# seed if client crashes
|
||||||
|
# remove existing fastresume first to prevent "losing" data
|
||||||
|
import common
|
||||||
|
try:
|
||||||
|
os.remove(os.path.join(common.CONFIG_DIR, torrentfiles, self.unique_IDs[unique_ID].filename + '.fastresume'))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
self.save_fastresume_data(event['unique_ID'])
|
self.save_fastresume_data(event['unique_ID'])
|
||||||
|
|
||||||
elif event['event_type'] is self.constants['EVENT_TRACKER_ANNOUNCE']:
|
elif event['event_type'] is self.constants['EVENT_TRACKER_ANNOUNCE']:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue