mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Book polishing: Do not error out when updating covers in EPUB files that have entries int heir manifest that point to missing files
This commit is contained in:
parent
d4a18a2a19
commit
ebf4068ebc
@ -94,7 +94,9 @@ class Container(object):
|
||||
# Update mime map with data from the OPF
|
||||
for item in self.opf_xpath('//opf:manifest/opf:item[@href and @media-type]'):
|
||||
href = item.get('href')
|
||||
self.mime_map[self.href_to_name(href, self.opf_name)] = item.get('media-type')
|
||||
name = self.href_to_name(href, self.opf_name)
|
||||
if name in self.mime_map:
|
||||
self.mime_map[name] = item.get('media-type')
|
||||
|
||||
def abspath_to_name(self, fullpath):
|
||||
return self.relpath(os.path.abspath(fullpath)).replace(os.sep, '/')
|
||||
|
Loading…
x
Reference in New Issue
Block a user