Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/efreet
Dir : e17/libs/efreet/src/lib
Modified Files:
efreet_mime.c
Log Message:
externsion checks should be case-insensitve.
===================================================================
RCS file: /cvs/e/e17/libs/efreet/src/lib/efreet_mime.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- efreet_mime.c 26 Jul 2007 11:30:10 -0000 1.24
+++ efreet_mime.c 11 Aug 2007 13:20:16 -0000 1.25
@@ -258,23 +258,26 @@
const char *efreet_mime_globs_type_get(const char *file)
{
Efreet_Mime_Glob *g;
- char *s;
+ char *s, *sl;
const char *ext, *mime;
-
+
/*
* Check in the extension hash for the type
*/
- ext = strchr(file,'.');
- while(ext)
- {
+ sl = alloca(strlen(file) + 1);
+ strcpy(sl, file);
+ for (s = sl; *s; s++) *s = tolower(*s);
+ ext = strchr(sl,'.');
+ while(ext)
+ {
++ext;
- if(ext && (mime = ecore_hash_get(wild, ext)))
- return mime;
+ if (ext && (mime = ecore_hash_get(wild, ext)))
+ return mime;
ext = strchr(ext,'.');
- }
-
+ }
+
/*
* Fallback to the other globs if not found
*/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs