Author: johnnyg

Revision: 5893

Log:
        Fix torrent name being blank when root folder is renamed to /
Update changelog (for previous commit as well)

Diff:
Modified: branches/1.2_RC/ChangeLog
===================================================================
--- branches/1.2_RC/ChangeLog   2009-10-30 00:02:25 UTC (rev 5892)
+++ branches/1.2_RC/ChangeLog   2009-10-30 00:15:22 UTC (rev 5893)
@@ -1,6 +1,8 @@
 === Deluge 1.2.0_rc3 (In Development) ===
 ==== Core ====
        * Fix #1047 move completed does not work if saving to non default path
+       * Fix renamed files not being utf-8 encoded
+       * Fix torrent name being blank when renaming root folder to /
 
 ==== GtkUI ====
        * replace & with & in the details tab to ensure there are no markup 
errors

Modified: branches/1.2_RC/deluge/core/torrent.py
===================================================================
--- branches/1.2_RC/deluge/core/torrent.py      2009-10-30 00:02:25 UTC (rev 
5892)
+++ branches/1.2_RC/deluge/core/torrent.py      2009-10-30 00:15:22 UTC (rev 
5893)
@@ -608,6 +608,8 @@
         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:

Modified: trunk/deluge/core/torrent.py
===================================================================
--- trunk/deluge/core/torrent.py        2009-10-30 00:02:25 UTC (rev 5892)
+++ trunk/deluge/core/torrent.py        2009-10-30 00:15:22 UTC (rev 5893)
@@ -608,6 +608,8 @@
         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:



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to