Compare commits

...

2 Commits

Author SHA1 Message Date
Jean Guyomarc'h f46a24ab32 edje_cc: fix misleading error
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
2016-03-19 12:22:51 +01:00
Jean Guyomarc'h 181a9f3334 Revert "edje: seems like preloading is fixed and we can now run edje_cc in //"
This reverts commit e6a27e13b5.
2016-03-19 11:50:40 +01:00
2 changed files with 9 additions and 2 deletions

View File

@ -38,7 +38,7 @@ int no_save = 0;
int min_quality = 0;
int max_quality = 100;
int compress_mode = EET_COMPRESSION_HI;
int threads = 1;
int threads = 0;
int annotate = 0;
int no_etc1 = 0;
int no_etc2 = 0;

View File

@ -1254,6 +1254,7 @@ data_write_images(Eet_File *ef, int *image_num)
Eina_List *ll;
char *s;
int load_err = EVAS_LOAD_ERROR_NONE;
int relevant_load_error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
Image_Write *iw;
img = &edje_file->image_dir->entries[i];
@ -1304,6 +1305,8 @@ data_write_images(Eet_File *ef, int *image_num)
data_image_preload_done(iw, evas, im, NULL);
break;
}
else if (load_err != EVAS_LOAD_ERROR_DOES_NOT_EXIST)
relevant_load_error = load_err;
}
if (load_err != EVAS_LOAD_ERROR_NONE)
{
@ -1323,7 +1326,11 @@ data_write_images(Eet_File *ef, int *image_num)
else
{
free(iw);
error_and_abort_image_load_error(ef, img->entry, load_err);
error_and_abort_image_load_error(
ef, img->entry,
(relevant_load_error != EVAS_LOAD_ERROR_DOES_NOT_EXIST)
? relevant_load_error
: load_err);
exit(1); // ensure static analysis tools know we exit
}
}