From 96c399f7f5fe9fd5895fc501d71349fb0d566db4 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sat, 9 May 2009 03:42:39 +0000 Subject: [PATCH] Optimize ti_name a touch --- deluge/core/torrent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 3f75b009e..fb58d8d75 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -621,7 +621,7 @@ class Torrent: 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: