mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
When getting verified links handle links relative to the current file
This commit is contained in:
parent
a2f008766e
commit
b70d23f3e4
1 changed files with 3 additions and 2 deletions
|
|
@ -191,9 +191,10 @@ def verify_links(self):
|
|||
p = urlparse(urlunquote(link))
|
||||
except Exception:
|
||||
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:
|
||||
path = spine_paths[os.path.abspath(os.path.join(base, p.path))]
|
||||
path = spine_paths[path]
|
||||
except Exception:
|
||||
continue
|
||||
if not p.fragment or p.fragment in path.anchor_map:
|
||||
|
|
|
|||
Loading…
Reference in a new issue