Fix #2017 (Another PRC file cover detection issue)

This commit is contained in:
Kovid Goyal 2009-03-08 10:43:28 -07:00
parent 14891bdd52
commit 1ee09b1930

View File

@ -370,6 +370,11 @@ class MobiReader(object):
opf.cover = 'images/%05d.jpg'%(self.book_header.exth.cover_offset+1)
elif mi.cover is not None:
opf.cover = mi.cover
else:
opf.cover = 'images/%05d.jpg'%1
if not os.path.exists(os.path.join(os.path.dirname(htmlfile),
*opf.cover.split('/'))):
opf.cover = None
manifest = [(htmlfile, 'text/x-oeb1-document')]
bp = os.path.dirname(htmlfile)
for i in getattr(self, 'image_names', []):