This commit is contained in:
Kovid Goyal 2017-07-15 14:27:32 +05:30
parent 37bd4825dc
commit 8d36d399d7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -400,6 +400,8 @@ class OEBReader(object):
continue continue
href = item.abshref(urlnormalize(href[0])) if href and href[0] else '' href = item.abshref(urlnormalize(href[0])) if href and href[0] else ''
path, _ = urldefrag(href) 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: if href and path not in self.oeb.manifest.hrefs:
self.logger.warn('TOC reference %r not found' % href) self.logger.warn('TOC reference %r not found' % href)
gc = xpath(child, 'ncx:navPoint') gc = xpath(child, 'ncx:navPoint')