mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
CHM Input: Yet another regression opening CHM files with missing internal files on windows. See #2023377 (Since the last update Calibre cannot open some of my ebooks.) [Since the last update Calibre cannot open some of my ebooks.](https://bugs.launchpad.net/calibre/+bug/2023377)
This commit is contained in:
parent
0acd1a8182
commit
a1b874398d
@ -623,9 +623,13 @@ if iswindows:
|
|||||||
|
|
||||||
def get_long_path_name(path):
|
def get_long_path_name(path):
|
||||||
from calibre_extensions.winutil import get_long_path_name
|
from calibre_extensions.winutil import get_long_path_name
|
||||||
if os.path.isabs(path) and not path.startswith(long_path_prefix):
|
lpath = path
|
||||||
path = long_path_prefix + path
|
if os.path.isabs(lpath) and not lpath.startswith(long_path_prefix):
|
||||||
return get_long_path_name(path)
|
lpath = long_path_prefix + lpath
|
||||||
|
try:
|
||||||
|
return get_long_path_name(lpath)
|
||||||
|
except FileNotFoundError:
|
||||||
|
return path
|
||||||
|
|
||||||
else:
|
else:
|
||||||
def make_long_path_useable(path):
|
def make_long_path_useable(path):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user