From 72ec926c1afdb312ad51dfbbac117c1775abfdb6 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 12 Jul 2010 14:45:13 -0700 Subject: [PATCH] Do not attempt to move a torrents storage if the destination path does not exist --- deluge/core/torrent.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index f9f80ca7a..dc569c5f8 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -794,6 +794,9 @@ class Torrent(object): def move_storage(self, dest): """Move a torrent's storage location""" + if not os.path.exists(dest): + log.error("Could not move storage for torrent %s since %s does not exist!", self.torrent_id, dest) + return False try: self.handle.move_storage(dest.encode("utf8")) except: