diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 68e09a8..3202ded 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -886,27 +886,20 @@ def connect_peer(self, ip, port): def move_storage(self, dest): """Move a torrent's storage location""" - # Attempt to convert utf8 path to unicode - # Note: Inconsistent encoding for 'dest', needs future investigation - try: - dest_u = unicode(dest, "utf-8") - except TypeError: - # String is already unicode - dest_u = dest - - if not os.path.exists(dest_u): + if not os.path.exists(dest): try: # Try to make the destination path if it doesn't exist - os.makedirs(dest_u) + os.makedirs(dest) except IOError, e: log.exception(e) log.error("Could not move storage for torrent %s since %s does " "not exist and could not create the directory.", - self.torrent_id, dest_u) + self.torrent_id, dest) return False try: - self.handle.move_storage(dest_u) - except: + self.handle.move_storage(dest) + except Exception, e: + log.exception(e) return False return True