From: Carsten H. (T. R. <ra...@ra...> - 2007-08-12 02:49:00
|
On Sat, 11 Aug 2007 18:24:15 +0200 Peter Wehrfritz <pet...@we...> babbled: yes - as it will only be comparing a series of extenstions after the first "." the lowering of the chars before that is harmless. this assumes the extension is also stored in lower case too (which seems to be the case). so you have "BigSmellyFish.JPG" -> "bigsmellyfish.jpg" then u lookup "jpg" if it was "BigSmellyFish.tar.GZ" -> "bigsmellyfish.tar.gz" then you lookup "tar.gz" and tyhen if that fails, look up "gz". > Enlightenment CVS schrieb: > > 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; > > > Are you sure that you want to lower the whole filename? > > ------------------------------------------------------------------------- > 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-devel mailing list > enl...@li... > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ra...@ra... 裸好多 Tokyo, Japan (東京 日本) |