mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit Book: Fix error in the Check Book tool when items in the opf have paths starting with a leading slash. Fixes #1319378 [Error in content.opf causes ebook editor checking to fail](https://bugs.launchpad.net/calibre/+bug/1319378)
This commit is contained in:
parent
00c6b21b74
commit
f28ee68679
@ -215,7 +215,8 @@ def check_opf(container):
|
|||||||
seen, dups = {}, {}
|
seen, dups = {}, {}
|
||||||
for item in container.opf_xpath('/opf:package/opf:manifest/opf:item[@href]'):
|
for item in container.opf_xpath('/opf:package/opf:manifest/opf:item[@href]'):
|
||||||
href = item.get('href')
|
href = item.get('href')
|
||||||
if not container.exists(container.href_to_name(href, container.opf_name)):
|
hname = container.href_to_name(href, container.opf_name)
|
||||||
|
if not hname or not container.exists(hname):
|
||||||
errors.append(MissingHref(container.opf_name, href, item.sourceline))
|
errors.append(MissingHref(container.opf_name, href, item.sourceline))
|
||||||
if href in seen:
|
if href in seen:
|
||||||
if href not in dups:
|
if href not in dups:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user