mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix invalid /guide/reference detection bug.
This commit is contained in:
parent
99bdab5d69
commit
9a30cdc3f2
@ -583,7 +583,8 @@ class OEBBook(object):
|
|||||||
self.guide = guide = Guide(self)
|
self.guide = guide = Guide(self)
|
||||||
for elem in xpath(opf, '/o2:package/o2:guide/o2:reference'):
|
for elem in xpath(opf, '/o2:package/o2:guide/o2:reference'):
|
||||||
href = elem.get('href')
|
href = elem.get('href')
|
||||||
if href not in self.manifest.hrefs:
|
path, frag = urldefrag(href)
|
||||||
|
if path not in self.manifest.hrefs:
|
||||||
self.logger.log_warn(u'Guide reference %r not found' % href)
|
self.logger.log_warn(u'Guide reference %r not found' % href)
|
||||||
continue
|
continue
|
||||||
guide.add(elem.get('type'), elem.get('title'), href)
|
guide.add(elem.get('type'), elem.get('title'), href)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user