From b70d23f3e45d2470c51b0bb4f7890f6a0e5c2bb3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 5 Nov 2014 22:33:51 +0530 Subject: [PATCH] When getting verified links handle links relative to the current file --- src/calibre/ebooks/oeb/iterator/book.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/oeb/iterator/book.py b/src/calibre/ebooks/oeb/iterator/book.py index 9ab0c991b4..c290fc4861 100644 --- a/src/calibre/ebooks/oeb/iterator/book.py +++ b/src/calibre/ebooks/oeb/iterator/book.py @@ -191,9 +191,10 @@ class EbookIterator(BookmarksMixin): 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: