Module: deluge Branch: master Commit: dfb75d67b9ce3b312ffeb412a13fa9d82b2feffd
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 851bdeb..1768a37 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -797,6 +797,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.
