From 5b3528c9d14e365e3acd9c3f97c863ec9b5d46d9 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sat, 9 May 2009 03:05:43 +0000 Subject: [PATCH] Torrent name is now changed when the root folder or file is renamed --- deluge/core/torrent.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 927cc4375..3f75b009e 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -621,10 +621,11 @@ class Torrent: def ti_name(): if self.handle.has_metadata(): + name = os.path.split(self.torrent_info.file_at(0).path)[0] try: - return self.torrent_info.name().decode("utf8", "ignore") + return name.decode("utf8", "ignore") except UnicodeDecodeError: - return self.torrent_info.name() + return name return self.torrent_id def ti_priv():