Module: deluge Branch: 1.2-stable Commit: 0b609bf4ad5b3e3bd7ba426086c2bb2482b2b616
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 27989b8..380e6eb 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -740,6 +740,9 @@ class Torrent: 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.
