From 6d2d3c0fd094a7cbf7a94f968f178b4141fdf27c Mon Sep 17 00:00:00 2001 From: John Garland Date: Fri, 30 Oct 2009 00:15:22 +0000 Subject: [PATCH] Fix torrent name being blank when root folder is renamed to / Update changelog (for previous commit as well) --- deluge/core/torrent.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index a9e621f82..a6984467f 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -608,6 +608,8 @@ class Torrent: def ti_name(): if self.handle.has_metadata(): name = self.torrent_info.file_at(0).path.split("/", 1)[0] + if not name: + return self.torrent_info.name() try: return name.decode("utf8", "ignore") except UnicodeDecodeError: