mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Workaround for unicode paths
This commit is contained in:
parent
4bf0845457
commit
790abb0b2f
@ -51,6 +51,8 @@ def munge_paths(basepath, url):
|
||||
if not path:
|
||||
path = basepath
|
||||
elif not os.path.isabs(path):
|
||||
if isinstance(path, unicode):
|
||||
path = path.encode(sys.getfilesystemencoding())
|
||||
path = os.path.join(os.path.dirname(basepath), path)
|
||||
return os.path.normpath(path), fragment
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user