mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -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):
|
||||
from calibre_extensions.winutil import get_long_path_name
|
||||
if os.path.isabs(path) and not path.startswith(long_path_prefix):
|
||||
path = long_path_prefix + path
|
||||
return get_long_path_name(path)
|
||||
lpath = path
|
||||
if os.path.isabs(lpath) and not lpath.startswith(long_path_prefix):
|
||||
lpath = long_path_prefix + lpath
|
||||
try:
|
||||
return get_long_path_name(lpath)
|
||||
except FileNotFoundError:
|
||||
return path
|
||||
|
||||
else:
|
||||
def make_long_path_useable(path):
|
||||
|
Loading…
x
Reference in New Issue
Block a user