summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Garland <johnnyg@gmail.com>2009-12-26 17:09:05 +0000
committerJohn Garland <johnnyg@gmail.com>2009-12-26 17:09:05 +0000
commitafbeaa6b7d6bb58f5c6098daa6125a6d6489de71 (patch)
treecb097c8073b0b12889436414f2db16d30a0e0681
parentf5409e0d0cb958ae84e9ee13e0e0ab062ac5239f (diff)
downloaddeluge-afbeaa6b7d6bb58f5c6098daa6125a6d6489de71.tar.gz
deluge-afbeaa6b7d6bb58f5c6098daa6125a6d6489de71.tar.bz2
deluge-afbeaa6b7d6bb58f5c6098daa6125a6d6489de71.zip
Fix torrent info name not being utf-8 decoded when root file/folder name is blank
-rw-r--r--ChangeLog2
-rw-r--r--deluge/core/torrent.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3452380c8..7f65786ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@
* Change share ratio calculation to use the total done instead of the all time
downloaded value. This change will make the share ratio calculation not
use data downloaded in failed hash checks.
+ * Fix torrent info name not being utf-8 decoded when root file/folder name
+ is blank
==== GtkUI ====
* Fix #1104, #735 use path.utf-8 if available
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: