mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
When getting verified links handle links relative to the current file
This commit is contained in:
parent
a2f008766e
commit
b70d23f3e4
@ -191,9 +191,10 @@ class EbookIterator(BookmarksMixin):
|
|||||||
p = urlparse(urlunquote(link))
|
p = urlparse(urlunquote(link))
|
||||||
except Exception:
|
except Exception:
|
||||||
continue
|
continue
|
||||||
if not p.scheme and not p.netloc and p.path:
|
if not p.scheme and not p.netloc:
|
||||||
|
path = os.path.abspath(os.path.join(base, p.path)) if p.path else item
|
||||||
try:
|
try:
|
||||||
path = spine_paths[os.path.abspath(os.path.join(base, p.path))]
|
path = spine_paths[path]
|
||||||
except Exception:
|
except Exception:
|
||||||
continue
|
continue
|
||||||
if not p.fragment or p.fragment in path.anchor_map:
|
if not p.fragment or p.fragment in path.anchor_map:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user