mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
py3: encode string before writing ebook mimetypes to the container
Fixes saving books in the editor.
This commit is contained in:
parent
11537ddd46
commit
df072f7cae
@ -1360,7 +1360,7 @@ class EpubContainer(Container):
|
||||
else:
|
||||
from calibre.ebooks.tweak import zip_rebuilder
|
||||
with lopen(join(self.root, 'mimetype'), 'wb') as f:
|
||||
f.write(guess_type('a.epub'))
|
||||
f.write(guess_type('a.epub').encode('utf-8'))
|
||||
zip_rebuilder(self.root, outpath)
|
||||
for name, data in iteritems(restore_fonts):
|
||||
with self.open(name, 'wb') as f:
|
||||
|
Loading…
x
Reference in New Issue
Block a user