diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-06-08 16:15:59 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-06-13 13:09:09 +0100 |
commit | 4766b28647c77a9695d0daa7efde8ba3d23c6b06 (patch) | |
tree | fb8eb2ca886256455429bdd664877ba2b6e20b5a /platform/android/viewer | |
parent | 2777fb92d7f4a6617ba5d83868d8597b7bac3465 (diff) | |
download | mupdf-4766b28647c77a9695d0daa7efde8ba3d23c6b06.tar.xz |
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.
Diffstat (limited to 'platform/android/viewer')
-rw-r--r-- | platform/android/viewer/jni/mupdf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/android/viewer/jni/mupdf.c b/platform/android/viewer/jni/mupdf.c index f9d6042b..451671c7 100644 --- a/platform/android/viewer/jni/mupdf.c +++ b/platform/android/viewer/jni/mupdf.c @@ -2600,7 +2600,7 @@ JNI_FN(MuPDFCore_saveInternal)(JNIEnv * env, jobject thiz) char *tmp; pdf_write_options opts = { 0 }; - opts.do_incremental = 1; + opts.do_incremental = pdf_can_be_saved_incrementally(ctx, idoc); tmp = tmp_path(glo->current_path); if (tmp) |