mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-26 10:05:19 +00:00
Fix displaying root folder when using the 'path.utf-8' keys in torrents
This commit is contained in:
parent
8175b2af58
commit
ac66f305e7
@ -115,7 +115,7 @@ class TorrentInfo(object):
|
||||
|
||||
for index, f in enumerate(self.__m_metadata["info"]["files"]):
|
||||
if "path.utf-8" in f:
|
||||
path = os.path.join(*f["path.utf-8"])
|
||||
path = os.path.join(prefix, *f["path.utf-8"])
|
||||
else:
|
||||
path = decode_string(os.path.join(prefix, decode_string(os.path.join(*f["path"]), self.encoding)), self.encoding)
|
||||
f["index"] = index
|
||||
@ -142,7 +142,7 @@ class TorrentInfo(object):
|
||||
|
||||
for f in self.__m_metadata["info"]["files"]:
|
||||
if "path.utf-8" in f:
|
||||
path = os.path.join(*f["path.utf-8"])
|
||||
path = os.path.join(prefix, *f["path.utf-8"])
|
||||
else:
|
||||
path = decode_string(os.path.join(prefix, decode_string(os.path.join(*f["path"]), self.encoding)), self.encoding)
|
||||
self.__m_files.append({
|
||||
|
Loading…
x
Reference in New Issue
Block a user