Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-01-11 04:32:29 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-01-11 04:32:29 +0300
commit961ac8eb85a6ede92c0d1bd062d2bdf264bbaef5 (patch)
treea7c28997d99792827db4004058ee6c5608a1b265 /source/blender/makesrna/intern/rna_image_api.c
parentf28d3955e9c848c32e340ec6696142ef124562d5 (diff)
Report errno string when writing files fails
Screenshot ignored errors, some render code printed 'Saved' without checking for failure. note: errno is now cleared from IMB_saveiff so all callers don't need to.
Diffstat (limited to 'source/blender/makesrna/intern/rna_image_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 7280cc622dc..23643f722d6 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -48,6 +48,7 @@
#ifdef RNA_RUNTIME
+#include <errno.h>
#include "BKE_image.h"
#include "BKE_packedFile.h"
#include "BKE_main.h"
@@ -101,7 +102,7 @@ static void rna_Image_save_render(Image *image, bContext *C, ReportList *reports
write_ibuf->dither = scene->r.dither_intensity;
if (!BKE_imbuf_write(write_ibuf, path, &scene->r.im_format)) {
- BKE_reportf(reports, RPT_ERROR, "Could not write image '%s'", path);
+ BKE_reportf(reports, RPT_ERROR, "Could not write image: %s, '%s'", strerror(errno), path);
}
if (write_ibuf != ibuf)