diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-09-06 22:28:07 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-09-06 22:28:07 +0200 |
commit | c4ef433ad67b4da34c04d2a0de901b077d1a26d0 (patch) | |
tree | bcbf8ddd990dd536a1fe8b30174bf733677c2bff | |
parent | b60eb48b26dd4fb17c6acba95f4a3ad922c3eed2 (diff) |
create file if it does not exist when saving an image
-rw-r--r-- | src/ImageMetaData.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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); |