From 4766b28647c77a9695d0daa7efde8ba3d23c6b06 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Wed, 8 Jun 2016 16:15:59 +0100 Subject: Bug 696822: Refuse to save a pdf file incrementally if it would break. If a file cannot be saved incrementally, then don't accept that as an option. In practise this means if someone asks to save a file incrementally, and it was repaired, or it uses encryption then throw an error. Add a new function to ask if it's safe to save a file incrementally, and use that in the appropriate places. --- platform/x11/pdfapp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'platform/x11') diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c index fd1f6a1a..9d1debbb 100644 --- a/platform/x11/pdfapp.c +++ b/platform/x11/pdfapp.c @@ -529,7 +529,7 @@ static int pdfapp_save(pdfapp_t *app) { pdf_write_options opts = { 0 }; - opts.do_incremental = 1; + opts.do_incremental = pdf_can_be_saved_incrementally(app->ctx, idoc); if (strcmp(buf, app->docpath) != 0) { -- cgit v1.2.3