mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-18 14:33:05 +02:00
...
This commit is contained in:
parent
0d11be0076
commit
ddb11549b2
1 changed files with 2 additions and 2 deletions
|
|
@ -76,8 +76,8 @@ def patheq(p1, p2):
|
|||
return d(p1) == d(p2)
|
||||
|
||||
def unicode_path(path, abs=False):
|
||||
if not isinstance(path, unicode):
|
||||
path = path.decode(sys.getfilesystemencoding())
|
||||
if isinstance(path, bytes):
|
||||
path = path.decode(filesystem_encoding)
|
||||
if abs:
|
||||
path = os.path.abspath(path)
|
||||
return path
|
||||
|
|
|
|||
Loading…
Reference in a new issue