Workaround for unicode paths

This commit is contained in:
Kovid Goyal 2008-05-02 10:58:13 -07:00
parent 4bf0845457
commit 790abb0b2f

View File

@ -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