diff options
author | Paul Gardiner <paulg.artifex@glidos.net> | 2012-11-26 16:36:18 +0000 |
---|---|---|
committer | Paul Gardiner <paulg.artifex@glidos.net> | 2012-11-27 10:40:23 +0000 |
commit | 4c2e89d670317b898ece971c7b4d111e473c9575 (patch) | |
tree | 64be7ca7253eab543e910d61c433282e5399de7d /apps/x11_main.c | |
parent | eaaf501fa47616691ab10b151022b4c91cc210b4 (diff) | |
download | mupdf-4c2e89d670317b898ece971c7b4d111e473c9575.tar.xz |
Forms: avoid directly saving to the original file
MuPDF needs access to the original file when saving, and in any case
directly overwritting the original file has much more potential for
data loss than use of a temporary file.
Diffstat (limited to 'apps/x11_main.c')
-rw-r--r-- | apps/x11_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/x11_main.c b/apps/x11_main.c index 9933242a..f4f8b24f 100644 --- a/apps/x11_main.c +++ b/apps/x11_main.c @@ -273,6 +273,11 @@ int wingetsavepath(pdfapp_t *app, char *buf, int len) return 0; } +void winreplacefile(char *source, char *target) +{ + rename(source, target); +} + void cleanup(pdfapp_t *app) { fz_context *ctx = app->ctx; |