путь к локальному файлу .torrent url-quoted

sandbox1
inpos 2016-03-04 23:53:23 +03:00
parent a691af60e8
commit 62592e685f
1 changed files with 1 additions and 1 deletions

View File

@ -662,7 +662,7 @@ class Pyrrent2http(object):
if uriPath != '' and sys.platform.startswith('win') and (os.path.sep == uriPath[0] or uriPath[0] == '/'): if uriPath != '' and sys.platform.startswith('win') and (os.path.sep == uriPath[0] or uriPath[0] == '/'):
uriPath = uriPath[1:] uriPath = uriPath[1:]
try: try:
absPath = os.path.abspath(uriPath) absPath = os.path.abspath(urllib.unquote(uriPath))
logging.info('Opening local file: %s' % (absPath,)) logging.info('Opening local file: %s' % (absPath,))
with open(absPath, 'rb') as f: with open(absPath, 'rb') as f:
torrent_info = lt.torrent_info(lt.bdecode(f.read())) torrent_info = lt.torrent_info(lt.bdecode(f.read()))