mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-02 02:12:57 +02:00
Fix regression that broke getting covers from some epub files on OS X. Fixes #932507 (recent update no longer pulling covers from dotepub files)
This commit is contained in:
parent
3563c895e1
commit
0596dd3d4e
1 changed files with 2 additions and 0 deletions
|
|
@ -160,6 +160,7 @@ def render_cover(opf, opf_path, zf, reader=None):
|
|||
with open(cpage, 'r+b') as f:
|
||||
raw = f.read()
|
||||
f.truncate(0)
|
||||
f.seek(0)
|
||||
raw = ffpat.sub(b'', raw)
|
||||
f.write(raw)
|
||||
from calibre.ebooks.chardet import xml_to_unicode
|
||||
|
|
@ -174,6 +175,7 @@ def render_cover(opf, opf_path, zf, reader=None):
|
|||
with open(path, 'r+b') as f:
|
||||
raw = f.read()
|
||||
f.truncate(0)
|
||||
f.seek(0)
|
||||
raw = ffpat.sub(b'', raw)
|
||||
f.write(raw)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue