From 915d35ba4a4e9659083004573aad1b5f76025145 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 5 May 2008 12:51:51 +0200 Subject: [PATCH] get the torrent size right for torrents with many files --- oxutils/torrent.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/oxutils/torrent.py b/oxutils/torrent.py index c7aa8d2..fe452fa 100644 --- a/oxutils/torrent.py +++ b/oxutils/torrent.py @@ -41,13 +41,8 @@ def getTorrentInfo(data): else: # let's assume we have a directory structure file_length = 0; - for file in info['files']: - path = '' - for item in file['path']: - if (path != ''): - path = path + "/" - path = path + item - file_length += file['length'] + for f in info['files']: + file_length += f['length'] for key in info: if key != 'pieces': tinfo[key] = info[key]