Hello e people.If evas cant find the type of a file, it will try to use evas_image_loader, but not everyone has it. This will not block anything or crash, because the error is handled, but it is somehow ugly because you spend time building the command line and gets ugly messages to stderr.
So here is a very simple patch to save some cycles in case you dont have the binary, and less spams your terminal.
Please review it, it is my very first patch for evas and i know nothing about evas (i reported the bug and been asked to do the patch)
We should save a lot more time by checking the existence of evas_image_loader once at startup and keep that information in memory instead of doing the check everytime, so i think some people here can do better than me with that
Index: src/modules/loaders/generic/evas_image_load_generic.c
===================================================================
--- src/modules/loaders/generic/evas_image_load_generic.c (révision 66530)
+++ src/modules/loaders/generic/evas_image_load_generic.c (copie de travail)
@@ -132,6 +132,12 @@ _load(Image_Entry *ie, const char *file, const cha
if (key) cmd_len += strlen(key) * 2;
cmd = alloca(cmd_len + 1);
+ if (access(img_loader, F_OK|X_OK))
+ {
+ *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
+ return EINA_FALSE;
+ }
+
len = strlen(file);
if (len < 1)
{
<<attachment: guillaume_friloux.vcf>>
------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev
_______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
