Skip to content

Commit 5a1f7a8

Browse files
committed
Revert "fix dt_imageio_export_with_flags return values (#17529)"
This reverts commit 7dc0faf.
1 parent 7970d71 commit 5a1f7a8

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

src/imageio/imageio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ gboolean dt_imageio_export_with_flags(const dt_imgid_t imgid,
12441244

12451245
if(!thumbnail_export)
12461246
dt_set_backthumb_time(5.0);
1247-
return TRUE; // success
1247+
return FALSE; // success
12481248

12491249
error:
12501250
dt_dev_pixelpipe_cleanup(&pipe);
@@ -1254,7 +1254,7 @@ gboolean dt_imageio_export_with_flags(const dt_imgid_t imgid,
12541254

12551255
if(!thumbnail_export)
12561256
dt_set_backthumb_time(5.0);
1257-
return FALSE;
1257+
return TRUE;
12581258
}
12591259

12601260

src/imageio/storage/disk.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,10 @@ int store(dt_imageio_module_storage_t *self,
468468
if(fail) return 1;
469469

470470
/* export image to file */
471-
if(!dt_imageio_export(imgid, filename, format, fdata, high_quality,
472-
upscale, TRUE, export_masks, icc_type,
473-
icc_filename, icc_intent, self, sdata,
474-
num, total, metadata))
471+
if(dt_imageio_export(imgid, filename, format, fdata, high_quality,
472+
upscale, TRUE, export_masks, icc_type,
473+
icc_filename, icc_intent, self, sdata,
474+
num, total, metadata) != 0)
475475
{
476476
dt_print(DT_DEBUG_ALWAYS,
477477
"[imageio_storage_disk] could not export to file: `%s'!\n",

src/imageio/storage/email.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ int store(dt_imageio_module_storage_t *self,
176176

177177
attachment->file = g_build_filename(tmpdir, dirname, (char *)NULL);
178178

179-
if(!dt_imageio_export(imgid, attachment->file, format, fdata, high_quality,
179+
if(dt_imageio_export(imgid, attachment->file, format, fdata, high_quality,
180180
upscale, TRUE, export_masks, icc_type,
181-
icc_filename, icc_intent, self, sdata, num, total, metadata))
181+
icc_filename, icc_intent, self, sdata, num, total, metadata) != 0)
182182
{
183183
dt_print(DT_DEBUG_ALWAYS,
184184
"[imageio_storage_email] could not export to file: `%s'!\n",

src/imageio/storage/gallery.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,9 @@ int store(dt_imageio_module_storage_t *self,
399399

400400
// export image to file. need this to be able to access meaningful
401401
// fdata->width and height below.
402-
if(!dt_imageio_export(imgid, filename, format, fdata, high_quality,
402+
if(dt_imageio_export(imgid, filename, format, fdata, high_quality,
403403
upscale, TRUE, export_masks, icc_type,
404-
icc_filename, icc_intent, self, sdata, num, total, metadata))
404+
icc_filename, icc_intent, self, sdata, num, total, metadata) != 0)
405405
{
406406
dt_print(DT_DEBUG_ALWAYS,
407407
"[imageio_storage_gallery] could not export to file: `%s'!\n", filename);
@@ -440,9 +440,9 @@ int store(dt_imageio_module_storage_t *self,
440440
if(c <= filename || *c == '/') c = filename + strlen(filename);
441441
ext = format->extension(fdata);
442442
sprintf(c, "-thumb.%s", ext);
443-
if(!dt_imageio_export(imgid, filename, format, fdata, FALSE, TRUE, FALSE,
443+
if(dt_imageio_export(imgid, filename, format, fdata, FALSE, TRUE, FALSE,
444444
export_masks, icc_type, icc_filename,
445-
icc_intent, self, sdata, num, total, NULL))
445+
icc_intent, self, sdata, num, total, NULL) != 0)
446446
{
447447
dt_print(DT_DEBUG_ALWAYS,
448448
"[imageio_storage_gallery] could not export to file: `%s'!\n", filename);

src/imageio/storage/piwigo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,9 +1348,9 @@ int store(dt_imageio_module_storage_t *self,
13481348

13491349
dt_image_cache_read_release(darktable.image_cache, img);
13501350

1351-
if(!dt_imageio_export(imgid, fname, format, fdata, high_quality, upscale,
1351+
if(dt_imageio_export(imgid, fname, format, fdata, high_quality, upscale,
13521352
TRUE, export_masks, icc_type, icc_filename,
1353-
icc_intent, self, sdata, num, total, metadata))
1353+
icc_intent, self, sdata, num, total, metadata) != 0)
13541354
{
13551355
dt_print(DT_DEBUG_ALWAYS,
13561356
"[imageio_storage_piwigo] could not export to file: `%s'!\n",

src/lua/luastorage.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ static int store_wrapper(struct dt_imageio_module_storage_t *self,
111111

112112
gchar *complete_name = g_build_filename(tmpdir, filename, (char *)NULL);
113113

114-
if(!dt_imageio_export(imgid, complete_name, format, fdata, high_quality, upscale, TRUE, export_masks,
115-
icc_type, icc_filename, icc_intent, self, self_data, num, total, metadata))
114+
if(dt_imageio_export(imgid, complete_name, format, fdata, high_quality, upscale, TRUE, export_masks,
115+
icc_type, icc_filename, icc_intent, self, self_data, num, total, metadata) != 0)
116116
{
117117
dt_print(DT_DEBUG_ALWAYS,
118118
"[lua] %s: could not export to file `%s'!\n", self->name(self), complete_name);

0 commit comments

Comments
 (0)