mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Container: handle internal hrefs that result in ValueError when try to resolve them on windows
This commit is contained in:
parent
f2572a36cd
commit
bd7aa63c14
@ -118,7 +118,10 @@ def href_to_name(href, root, base=None):
|
|||||||
# assume all such paths are invalid/absolute paths.
|
# assume all such paths are invalid/absolute paths.
|
||||||
return None
|
return None
|
||||||
fullpath = os.path.join(base, *href.split('/'))
|
fullpath = os.path.join(base, *href.split('/'))
|
||||||
return unicodedata.normalize('NFC', abspath_to_name(fullpath, root))
|
try:
|
||||||
|
return unicodedata.normalize('NFC', abspath_to_name(fullpath, root))
|
||||||
|
except ValueError:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
class ContainerBase: # {{{
|
class ContainerBase: # {{{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user