From 8d36d399d7480ceb3f769a3a32287c40915573bb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 15 Jul 2017 14:27:32 +0530 Subject: [PATCH] Fix #1704225 [Private bug](https://bugs.launchpad.net/calibre/+bug/1704225) --- src/calibre/ebooks/oeb/reader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/ebooks/oeb/reader.py b/src/calibre/ebooks/oeb/reader.py index 789f82c94a..bf005087f2 100644 --- a/src/calibre/ebooks/oeb/reader.py +++ b/src/calibre/ebooks/oeb/reader.py @@ -400,6 +400,8 @@ class OEBReader(object): continue href = item.abshref(urlnormalize(href[0])) if href and href[0] else '' path, _ = urldefrag(href) + if path and path not in self.oeb.manifest.hrefs: + path = urlnormalize(path) if href and path not in self.oeb.manifest.hrefs: self.logger.warn('TOC reference %r not found' % href) gc = xpath(child, 'ncx:navPoint')