Module: deluge Branch: 1.3-stable Commit: 72ec926c1afdb312ad51dfbbac117c1775abfdb6
Author: Andrew Resch <[email protected]> Date: Mon Jul 12 14:45:13 2010 -0700 Do not attempt to move a torrents storage if the destination path does not exist --- deluge/core/torrent.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index f9f80ca..dc569c5 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: -- You received this message because you are subscribed to the Google Groups "deluge-commit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/deluge-commit?hl=en.
