mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix a regression in calibre 5 that broke --explode-book and --implode-book in calibre-debug.exe
This commit is contained in:
parent
9407f7b08f
commit
320c525cfe
@ -126,7 +126,7 @@ def explode(ebook_file, output_dir):
|
||||
return
|
||||
h = '_' if iswindows else '.'
|
||||
with lopen(os.path.join(output_dir, h + '__explode_fmt__'), 'wb') as f:
|
||||
f.write(fmt)
|
||||
f.write(fmt.encode('utf-8'))
|
||||
prints('Book extracted to', output_dir)
|
||||
prints('Make your changes and once you are done, use --implode-book to rebuild')
|
||||
|
||||
@ -141,7 +141,7 @@ def implode(output_dir, ebook_file):
|
||||
efmt_path = os.path.join(output_dir, h + '__explode_fmt__')
|
||||
try:
|
||||
with lopen(efmt_path, 'rb') as f:
|
||||
efmt = f.read()
|
||||
efmt = f.read().decode('utf-8')
|
||||
except Exception:
|
||||
raise SystemExit('The folder %s does not seem to have been created by --explode-book' % output_dir)
|
||||
if efmt != fmt:
|
||||
|
Loading…
x
Reference in New Issue
Block a user