only check ext.. if there is one!

SVN revision: 31265
This commit is contained in:
Carsten Haitzler 2007-08-12 11:14:56 +00:00
parent 6b0688752a
commit 2f35dd7ab3
1 changed files with 11 additions and 8 deletions

View File

@ -265,15 +265,18 @@ const char *efreet_mime_globs_type_get(const char *file)
* Check in the extension hash for the type
*/
ext = strchr(file, '.');
sl = alloca(strlen(ext) + 1);
for (s = ext, p = sl; *s; s++, p++) *p = tolower(*s);
*p = 0;
p = sl;
while (p)
if (ext)
{
p++;
if (p && (mime = ecore_hash_get(wild, p))) return mime;
p = strchr(p, '.');
sl = alloca(strlen(ext) + 1);
for (s = ext, p = sl; *s; s++, p++) *p = tolower(*s);
*p = 0;
p = sl;
while (p)
{
p++;
if (p && (mime = ecore_hash_get(wild, p))) return mime;
p = strchr(p, '.');
}
}
/*