From fa79c37aa22bc80b2fab2d6403e7f86f0da13b6f Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Wed, 23 Dec 2009 01:28:33 +0000 Subject: [PATCH] Fix possible TorrentFinishedEvents being emitted on startup for already completed torrents --- deluge/core/torrentmanager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index 29cf775c4..33d517452 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -785,10 +785,10 @@ class TorrentManager(component.Component): total_download = torrent.get_status(["total_payload_download"])["total_payload_download"] # Move completed download to completed folder if needed - if not torrent.is_finished: + if not torrent.is_finished and total_download: move_path = None - if torrent.options["move_completed"] and total_download: + if torrent.options["move_completed"]: move_path = torrent.options["move_completed_path"] if torrent.options["download_location"] != move_path: torrent.move_storage(move_path)