summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@gmail.com>2016-03-19 12:22:51 +0100
committerJean Guyomarc'h <jean.guyomarch@gmail.com>2016-03-19 12:22:51 +0100
commitf46a24ab32a72e13bef5b919cd676be1341ab803 (patch)
treeba02406f0a5cbf1004e324fcddb740513b9d7377
parent181a9f33345fb16af313e7ac743467124fe7a831 (diff)
edje_cc: fix misleading errordevs/jayji/fixes
edje_cc tries several images paths when searching for an image. It stops its search only when the image was successfully loaded or all paths have been tested. If a load failed for some reason, but the file DOES exist, the relevant error, that contains the real reason of the failure will be overwriten by what is very likely to be "File Not Found" since another path has been tested, due to the failure of the previous one. In such case, the user received the "File Not Found" error, which is not the reason of the failure. @fix
-rw-r--r--src/bin/edje/edje_cc_out.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index 3a063babbe..62424ef962 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -1254,6 +1254,7 @@ data_write_images(Eet_File *ef, int *image_num)
1254 Eina_List *ll; 1254 Eina_List *ll;
1255 char *s; 1255 char *s;
1256 int load_err = EVAS_LOAD_ERROR_NONE; 1256 int load_err = EVAS_LOAD_ERROR_NONE;
1257 int relevant_load_error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
1257 Image_Write *iw; 1258 Image_Write *iw;
1258 1259
1259 img = &edje_file->image_dir->entries[i]; 1260 img = &edje_file->image_dir->entries[i];
@@ -1304,6 +1305,8 @@ data_write_images(Eet_File *ef, int *image_num)
1304 data_image_preload_done(iw, evas, im, NULL); 1305 data_image_preload_done(iw, evas, im, NULL);
1305 break; 1306 break;
1306 } 1307 }
1308 else if (load_err != EVAS_LOAD_ERROR_DOES_NOT_EXIST)
1309 relevant_load_error = load_err;
1307 } 1310 }
1308 if (load_err != EVAS_LOAD_ERROR_NONE) 1311 if (load_err != EVAS_LOAD_ERROR_NONE)
1309 { 1312 {
@@ -1323,7 +1326,11 @@ data_write_images(Eet_File *ef, int *image_num)
1323 else 1326 else
1324 { 1327 {
1325 free(iw); 1328 free(iw);
1326 error_and_abort_image_load_error(ef, img->entry, load_err); 1329 error_and_abort_image_load_error(
1330 ef, img->entry,
1331 (relevant_load_error != EVAS_LOAD_ERROR_DOES_NOT_EXIST)
1332 ? relevant_load_error
1333 : load_err);
1327 exit(1); // ensure static analysis tools know we exit 1334 exit(1); // ensure static analysis tools know we exit
1328 } 1335 }
1329 } 1336 }