From 0004b53032ee798297165e928b110c68fb6d3353 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 18 Aug 2019 22:38:05 -0700 Subject: [PATCH] Fix holdit command undoing manual opf changes. --- epubfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epubfile.py b/epubfile.py index 691b097..87e2598 100644 --- a/epubfile.py +++ b/epubfile.py @@ -1043,6 +1043,9 @@ def holdit_argparse(args): book = Epub.open(args.epub) print(book.root_directory.absolute_path) input('Press Enter when ready.') + # Saving re-writes the opf from memory, which might undo any manual changes. + # So let's re-read it first. + book.read_opf(book.opf_filepath) book.save(args.epub) def merge(input_filepaths, output_filename, do_headerfile=False):