путь к локальному файлу .torrent url-quoted
This commit is contained in:
		
							parent
							
								
									a691af60e8
								
							
						
					
					
						commit
						62592e685f
					
				@ -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()))
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user