Enlightenment CVS committal Author : raster Project : e17 Module : libs/efreet
Dir : e17/libs/efreet/src/lib Modified Files: efreet_mime.c Log Message: only check ext.. if there is one! =================================================================== RCS file: /cvs/e/e17/libs/efreet/src/lib/efreet_mime.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -3 -r1.26 -r1.27 --- efreet_mime.c 12 Aug 2007 10:00:02 -0000 1.26 +++ efreet_mime.c 12 Aug 2007 11:14:56 -0000 1.27 @@ -265,15 +265,18 @@ * 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, '.'); + } } /* ------------------------------------------------------------------------- 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 enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs