mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-18 14:26:24 +00:00
parent
ba68e1efa4
commit
d49686e82d
@ -314,14 +314,6 @@ class Manager:
|
|||||||
self.remove_torrent_ns(unique_ID)
|
self.remove_torrent_ns(unique_ID)
|
||||||
self.sync()
|
self.sync()
|
||||||
|
|
||||||
# Remove .torrent and .fastresume
|
|
||||||
os.remove(temp.filename)
|
|
||||||
try:
|
|
||||||
# Must be after removal of the torrent, because that saves a new .fastresume
|
|
||||||
os.remove(temp.filename + ".fastresume")
|
|
||||||
except OSError:
|
|
||||||
pass # Perhaps there never was one to begin with
|
|
||||||
|
|
||||||
# Remove data, if asked to do so
|
# Remove data, if asked to do so
|
||||||
if data_also:
|
if data_also:
|
||||||
# Must be done AFTER the torrent is removed
|
# Must be done AFTER the torrent is removed
|
||||||
@ -640,9 +632,17 @@ class Manager:
|
|||||||
to_delete.append(unique_ID)
|
to_delete.append(unique_ID)
|
||||||
|
|
||||||
for unique_ID in to_delete:
|
for unique_ID in to_delete:
|
||||||
|
temp = self.unique_IDs[unique_ID]
|
||||||
self.state.torrents.remove(self.unique_IDs[unique_ID])
|
self.state.torrents.remove(self.unique_IDs[unique_ID])
|
||||||
self.state.queue.remove(unique_ID)
|
self.state.queue.remove(unique_ID)
|
||||||
del self.unique_IDs[unique_ID]
|
del self.unique_IDs[unique_ID]
|
||||||
|
# Remove .torrent and .fastresume
|
||||||
|
os.remove(temp.filename)
|
||||||
|
try:
|
||||||
|
# Must be after removal of the torrent, because that saves a new .fastresume
|
||||||
|
os.remove(temp.filename + ".fastresume")
|
||||||
|
except OSError:
|
||||||
|
pass # Perhaps there never was one to begin with
|
||||||
|
|
||||||
# Add torrents to queue - at the end, of course
|
# Add torrents to queue - at the end, of course
|
||||||
for unique_ID in self.unique_IDs.keys():
|
for unique_ID in self.unique_IDs.keys():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user