Edit book: Handle EPUB files that erroneously list the OPF itself in the OPF manifest with an incorrect mime type

This commit is contained in:
Kovid Goyal 2014-01-21 19:24:27 +05:30
parent 7a307a2e24
commit 3edec38469

View File

@ -143,7 +143,7 @@ class Container(object): # {{{
for item in self.opf_xpath('//opf:manifest/opf:item[@href and @media-type]'):
href = item.get('href')
name = self.href_to_name(href, self.opf_name)
if name in self.mime_map:
if name in self.mime_map and name != self.opf_name:
self.mime_map[name] = item.get('media-type')
def clone_data(self, dest_dir):