Ethumb wasn't matching files to plugins if the extension were not
composed of all lowercase chars. This patch makes the ethumb match
case-insensitive.

-- 
João Paulo Rechi Vita
ProFUSION embedded systems
jprv...@profusion.mobi
Index: src/lib/Ethumb.c
===================================================================
--- src/lib/Ethumb.c	(revision 43353)
+++ src/lib/Ethumb.c	(working copy)
@@ -38,6 +38,7 @@
 #include <sys/stat.h>
 #include <dirent.h>
 #include <dlfcn.h>
+#include <ctype.h>
 #include "md5.h"
 
 #ifndef PATH_MAX
@@ -1041,22 +1042,30 @@
 static Eina_Bool
 _ethumb_plugin_generate(Ethumb *e)
 {
-   const char *ext;
+   const char *extp;
+   char *ext;
    Ethumb_Plugin *plugin;
+   int i;
 
-   ext = strrchr(e->src_path, '.');
-   if (!ext)
+   extp = strrchr(e->src_path, '.');
+   if (!extp)
      {
 	ERR("could not get extension for file \"%s\"", e->src_path);
 	return EINA_FALSE;
      }
 
-   plugin = eina_hash_find(_plugins_ext, ext + 1);
+   ext = strdup(extp + 1);
+   for (i = 0; ext[i] != '\0'; i++)
+	ext[i] = tolower(ext[i]);
+
+   plugin = eina_hash_find(_plugins_ext, ext);
    if (!plugin)
      {
-	DBG("no plugin for extension: \"%s\"", ext + 1);
+	DBG("no plugin for extension: \"%s\"", ext);
+	free(ext);
 	return EINA_FALSE;
      }
+   free(ext);
 
    if (e->frame)
      evas_object_hide(e->frame->edje);
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to