mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN: fix munge_paths
This commit is contained in:
parent
74ba2b90a4
commit
a9d8b24487
@ -53,7 +53,10 @@ def munge_paths(basepath, url):
|
|||||||
elif not os.path.isabs(path):
|
elif not os.path.isabs(path):
|
||||||
if isinstance(path, unicode):
|
if isinstance(path, unicode):
|
||||||
path = path.encode(sys.getfilesystemencoding())
|
path = path.encode(sys.getfilesystemencoding())
|
||||||
path = os.path.join(os.path.dirname(basepath), path)
|
dn = os.path.dirname(basepath)
|
||||||
|
if isinstance(dn, unicode):
|
||||||
|
dn = dn.encode(sys.getfilesystemencoding())
|
||||||
|
path = os.path.join(dn, path)
|
||||||
return os.path.normpath(path), fragment
|
return os.path.normpath(path), fragment
|
||||||
|
|
||||||
def strip_style_comments(match):
|
def strip_style_comments(match):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user