EPUB Input: Correctly update the Cover entry in the ToC even when the entry has a fragment reference. Fixes #999973 (Private bug)

This commit is contained in:
Kovid Goyal 2012-05-16 13:34:47 +05:30
parent 726bb958e7
commit 5ec4e24b00

View File

@ -207,7 +207,7 @@ class EPUBInput(InputFormatPlugin):
if rc:
cover_toc_item = None
for item in oeb.toc.iterdescendants():
if item.href == rc:
if item.href and item.href.partition('#')[0] == rc:
cover_toc_item = item
break
spine = {x.href for x in oeb.spine}