From c4ef433ad67b4da34c04d2a0de901b077d1a26d0 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Sat, 6 Sep 2008 22:28:07 +0200 Subject: create file if it does not exist when saving an image --- src/ImageMetaData.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ImageMetaData.cxx b/src/ImageMetaData.cxx index 06a16fa..09acbf9 100644 --- a/src/ImageMetaData.cxx +++ b/src/ImageMetaData.cxx @@ -262,7 +262,7 @@ ImageMetaData::save_image_jpgcom(char *in_img, char *out_img) { } if (!err) { - int out_fd = open(out_img, O_WRONLY|O_TRUNC); + int out_fd = open(out_img, O_WRONLY|O_TRUNC|O_CREAT, S_IRUSR|S_IWUSR); lseek(tmp_fd, 0, SEEK_SET); -- cgit v1.2.3