From 3edec38469fe1117e8109c43951201131ce511b6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 21 Jan 2014 19:24:27 +0530 Subject: [PATCH] Edit book: Handle EPUB files that erroneously list the OPF itself in the OPF manifest with an incorrect mime type --- src/calibre/ebooks/oeb/polish/container.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/polish/container.py b/src/calibre/ebooks/oeb/polish/container.py index 47c968c0fc..3296468782 100644 --- a/src/calibre/ebooks/oeb/polish/container.py +++ b/src/calibre/ebooks/oeb/polish/container.py @@ -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):