Properly fix #581

This commit is contained in:
Kovid Goyal 2008-03-29 14:25:14 +00:00
parent 90b8a74b0d
commit 457f622447

View File

@ -181,9 +181,10 @@ class MobiReader(object):
opf = OPFCreator(os.path.dirname(htmlfile), mi)
if hasattr(self.book_header.exth, 'cover_offset'):
opf.cover = 'images/%05d.jpg'%(self.book_header.exth.cover_offset+1)
manifest = [(os.path.basename(htmlfile), 'text/x-oeb1-document')]
manifest = [(htmlfile, 'text/x-oeb1-document')]
bp = os.path.dirname(htmlfile)
for i in self.image_names:
manifest.append(('images/'+i, 'image/jpg'))
manifest.append((os.path.join(bp,'images/',i), 'image/jpg'))
opf.create_manifest(manifest)
opf.create_spine([os.path.basename(htmlfile)])