r6064 - Fix torrent info name not being utf-8 decoded when...

0 views
Skip to first unread message

s...@deluge-torrent.org

unread,
Dec 26, 2009, 12:09:06 PM12/26/09
to deluge...@googlegroups.com
Author: johnnyg

Revision: 6064

Log:
Fix torrent info name not being utf-8 decoded when root file/folder name is blank

Diff:
Modified: branches/1.2_RC/ChangeLog
===================================================================
--- branches/1.2_RC/ChangeLog 2009-12-25 21:33:01 UTC (rev 6063)
+++ branches/1.2_RC/ChangeLog 2009-12-26 17:09:05 UTC (rev 6064)
@@ -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

Modified: branches/1.2_RC/deluge/core/torrent.py
===================================================================
--- branches/1.2_RC/deluge/core/torrent.py 2009-12-25 21:33:01 UTC (rev 6063)
+++ branches/1.2_RC/deluge/core/torrent.py 2009-12-26 17:09:05 UTC (rev 6064)
@@ -603,7 +603,7 @@
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:

Modified: trunk/deluge/core/torrent.py
===================================================================
--- trunk/deluge/core/torrent.py 2009-12-25 21:33:01 UTC (rev 6063)
+++ trunk/deluge/core/torrent.py 2009-12-26 17:09:05 UTC (rev 6064)
@@ -603,7 +603,7 @@
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:


Reply all
Reply to author
Forward
0 new messages