summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorPaul Gardiner <paul.gardiner@artifex.com>2018-07-17 13:17:30 +0100
committerPaul Gardiner <paul.gardiner@artifex.com>2018-07-17 14:57:54 +0100
commit3d22bf8ba1c824f6722be63d9b5109fce56e076c (patch)
tree461e07b26648b1f25cd18b13f25d26fe58dd677d /platform
parentdd6e3d0366edec75541666a01b3ddd513ba02903 (diff)
downloadmupdf-3d22bf8ba1c824f6722be63d9b5109fce56e076c.tar.xz
Have pdfapp_save close and reopen the document in all cases
We need to do this, because much can change on saving, objects renumbered and moved, and we could run into inconsistencies between the file and in-memory information. This function was already reopening in the case of saving back to the same file, but in other cases.
Diffstat (limited to 'platform')
-rw-r--r--platform/x11/pdfapp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c
index a3ad0947..01011b2b 100644
--- a/platform/x11/pdfapp.c
+++ b/platform/x11/pdfapp.c
@@ -549,6 +549,8 @@ static int pdfapp_save(pdfapp_t *app)
{
wincopyfile(app->docpath, buf);
pdf_save_document(app->ctx, idoc, buf, &opts);
+ pdfapp_close(app);
+ pdfapp_open(app, buf, 1);
return 1;
}