diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index a18229969..050abbce9 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -544,6 +544,7 @@ class Torrent: self.torrent_id) log.debug("Saving fastresume file: %s", path) try: + self.delete_fastresume() fastresume = open(path, "wb") fastresume.write(resume_data) fastresume.close() diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index 150c04d33..3c2e4b6a8 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -563,9 +563,7 @@ class TorrentManager(component.Component): def save_resume_data(self): """Saves resume data for all the torrents""" for torrent in self.torrents.values(): - if not torrent.is_finished: - torrent.delete_fastresume() - torrent.write_fastresume() + torrent.write_fastresume() def queue_top(self, torrent_id): """Queue torrent to top""" @@ -647,9 +645,7 @@ class TorrentManager(component.Component): component.get("SignalManager").emit("torrent_paused", torrent_id) # Write the fastresume file - if not self.torrents[torrent_id].is_finished: - self.torrents[torrent_id].delete_fastresume() - self.torrents[torrent_id].write_fastresume() + self.torrents[torrent_id].write_fastresume() if torrent_id in self.shutdown_torrent_pause_list: self.shutdown_torrent_pause_list.remove(torrent_id)