Author: andar

Revision: 5253

Log:
        Apply #932 minor ti_name optimization

Diff:
Modified: branches/1.1.0_RC/deluge/core/torrent.py
===================================================================
--- branches/1.1.0_RC/deluge/core/torrent.py    2009-05-10 19:11:06 UTC (rev 
5252)
+++ branches/1.1.0_RC/deluge/core/torrent.py    2009-05-10 19:28:23 UTC (rev 
5253)
@@ -637,7 +637,7 @@
 
         def ti_name():
             if self.handle.has_metadata():
-                name = self.torrent_info.file_at(0).path.split("/")[0]
+                name = self.torrent_info.file_at(0).path.split("/", 1)[0]
                 try:
                     return name.decode("utf8", "ignore")
                 except UnicodeDecodeError:

Modified: trunk/deluge/core/torrent.py
===================================================================
--- trunk/deluge/core/torrent.py        2009-05-10 19:11:06 UTC (rev 5252)
+++ trunk/deluge/core/torrent.py        2009-05-10 19:28:23 UTC (rev 5253)
@@ -621,7 +621,7 @@
 
         def ti_name():
             if self.handle.has_metadata():
-                name = self.torrent_info.file_at(0).path.split("/")[0]
+                name = self.torrent_info.file_at(0).path.split("/", 1)[0]
                 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