From 3e67620e55a4b6727e52272871f695e61de0cec1 Mon Sep 17 00:00:00 2001 From: John Garland Date: Sat, 26 Dec 2009 17:09:05 +0000 Subject: [PATCH] Fix torrent info name not being utf-8 decoded when root file/folder name is blank --- deluge/core/torrent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 7cddf616c..fae494d5c 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -603,7 +603,7 @@ class Torrent: if self.handle.has_metadata(): name = self.torrent_info.file_at(0).path.split("/", 1)[0] if not name: - return self.torrent_info.name() + name = self.torrent_info.name() try: return name.decode("utf8", "ignore") except UnicodeDecodeError: