forked from enlightenment/efl
externsion checks should be case-insensitve.
SVN revision: 31245
This commit is contained in:
parent
f23f99bf84
commit
492e5f9644
|
@ -258,23 +258,26 @@ const char *efreet_mime_magic_type_get(const char *file)
|
||||||
const char *efreet_mime_globs_type_get(const char *file)
|
const char *efreet_mime_globs_type_get(const char *file)
|
||||||
{
|
{
|
||||||
Efreet_Mime_Glob *g;
|
Efreet_Mime_Glob *g;
|
||||||
char *s;
|
char *s, *sl;
|
||||||
const char *ext, *mime;
|
const char *ext, *mime;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check in the extension hash for the type
|
* Check in the extension hash for the type
|
||||||
*/
|
*/
|
||||||
ext = strchr(file,'.');
|
sl = alloca(strlen(file) + 1);
|
||||||
while(ext)
|
strcpy(sl, file);
|
||||||
{
|
for (s = sl; *s; s++) *s = tolower(*s);
|
||||||
|
ext = strchr(sl,'.');
|
||||||
|
while(ext)
|
||||||
|
{
|
||||||
++ext;
|
++ext;
|
||||||
|
|
||||||
if(ext && (mime = ecore_hash_get(wild, ext)))
|
if (ext && (mime = ecore_hash_get(wild, ext)))
|
||||||
return mime;
|
return mime;
|
||||||
|
|
||||||
ext = strchr(ext,'.');
|
ext = strchr(ext,'.');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fallback to the other globs if not found
|
* Fallback to the other globs if not found
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue