Виндовые пути
parent
62592e685f
commit
48d77de875
|
@ -8,11 +8,7 @@ import time
|
||||||
import urllib2
|
import urllib2
|
||||||
import httplib
|
import httplib
|
||||||
from os.path import dirname
|
from os.path import dirname
|
||||||
#from download import LibraryManager
|
|
||||||
|
|
||||||
import pyrrent2http
|
import pyrrent2http
|
||||||
|
|
||||||
#import logpipe
|
|
||||||
import mimetypes
|
import mimetypes
|
||||||
import xbmc
|
import xbmc
|
||||||
from error import Error
|
from error import Error
|
||||||
|
|
|
@ -662,6 +662,11 @@ 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:
|
||||||
|
if sys.platform.startswith('win'):
|
||||||
|
driveLetter = uriPath[:2]
|
||||||
|
wpath = uriPath[2:].replace('\\', '/')
|
||||||
|
absPath = driveLetter + os.path.abspath(urllib.unquote(wpath)).replace('/', '\\')
|
||||||
|
else:
|
||||||
absPath = os.path.abspath(urllib.unquote(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:
|
||||||
|
|
Loading…
Reference in New Issue