-2011-01-29 Carsten Haitzler (The Rasterman)
+6~2011-01-29 Carsten Haitzler (The Rasterman)
1.0.0 release
are possibly faster. I haven't noticed any difference between the
two speed-wise, but there probably are in some rare cases.
+2011-05-06 Cedric Bail
+
+ * Don't try all image loader when user is pointing them on a directory.
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
#include "evas_common.h"
#include "evas_private.h"
#include "evas_cs.h"
Evas_Image_Load_Func *evas_image_load_func = NULL;
const char *loader = NULL, *end;
Evas_Module *em;
+ struct stat st;
unsigned int i;
int len, ret = EVAS_LOAD_ERROR_NONE;
struct evas_image_foreach_loader_data fdata;
}
}
#endif
+ if (stat(ie->file, &st) != 0 || S_ISDIR(st.st_mode))
+ {
+ DBG("trying to open directory '%s' !", ie->file);
+ return EVAS_LOAD_ERROR_DOES_NOT_EXIST;
+ }
+
len = strlen(ie->file);
end = ie->file + len;
for (i = 0; i < (sizeof (loaders) / sizeof(struct ext_loader_s)); i++)