Author: andar

Revision: 5250

Log:
        Optimize ti_name a touch

Diff:
Modified: branches/1.1.0_RC/deluge/core/torrent.py
===================================================================
--- branches/1.1.0_RC/deluge/core/torrent.py    2009-05-09 03:28:43 UTC (rev 
5249)
+++ branches/1.1.0_RC/deluge/core/torrent.py    2009-05-09 03:42:39 UTC (rev 
5250)
@@ -637,7 +637,7 @@
 
         def ti_name():
             if self.handle.has_metadata():
-                name = os.path.split(self.torrent_info.file_at(0).path)[0]
+                name = self.torrent_info.file_at(0).path.split("/")[0]
                 try:
                     return name.decode("utf8", "ignore")
                 except UnicodeDecodeError:

Modified: trunk/deluge/core/torrent.py
===================================================================
--- trunk/deluge/core/torrent.py        2009-05-09 03:28:43 UTC (rev 5249)
+++ trunk/deluge/core/torrent.py        2009-05-09 03:42:39 UTC (rev 5250)
@@ -621,7 +621,7 @@
 
         def ti_name():
             if self.handle.has_metadata():
-                name = os.path.split(self.torrent_info.file_at(0).path)[0]
+                name = self.torrent_info.file_at(0).path.split("/")[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