mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-26 10:38:30 +01:00
Edit Book: Refuse to save EPUB files that have missing container.xml files. See #1740460 (Edit Book feature results in error after previously editing successfully)
This commit is contained in:
parent
38f2b885c0
commit
2ea7fd0c52
1 changed files with 4 additions and 0 deletions
|
|
@ -1296,6 +1296,10 @@ def process_encryption(self):
|
|||
|
||||
def commit(self, outpath=None, keep_parsed=False):
|
||||
super(EpubContainer, self).commit(keep_parsed=keep_parsed)
|
||||
container_path = join(self.root, 'META-INF', 'container.xml')
|
||||
if not exists(container_path):
|
||||
raise InvalidEpub('No META-INF/container.xml in EPUB, this typically happens if the temporary files calibre'
|
||||
' is using are deleted by some other program while calibre is running')
|
||||
restore_fonts = {}
|
||||
for name in self.obfuscated_fonts:
|
||||
if name not in self.name_path_map:
|
||||
|
|
|
|||
Loading…
Reference in a new issue