On 02/03/2011 08:26 PM, Enlightenment SVN wrote: > Log: > Whoops bad idea. Efreet is crazy right now. Go back to strncasecmp.
What's wrong with efreet_mime? It hasn't been touched for ages. Sebastian > > > Author: titan > Date: 2011-02-03 11:26:56 -0800 (Thu, 03 Feb 2011) > New Revision: 56681 > Trac: http://trac.enlightenment.org/e/changeset/56681 > > Modified: > trunk/ephoto/src/bin/ephoto_main.c > > Modified: trunk/ephoto/src/bin/ephoto_main.c > =================================================================== > --- trunk/ephoto/src/bin/ephoto_main.c 2011-02-03 19:18:36 UTC (rev > 56680) > +++ trunk/ephoto/src/bin/ephoto_main.c 2011-02-03 19:26:56 UTC (rev > 56681) > @@ -87,17 +87,18 @@ > static Eina_Bool > _ephoto_thumb_populate_filter(void *data __UNUSED__, Eio_File *handler > __UNUSED__, const Eina_File_Direct_Info *info) > { > - const char *bname = info->path + info->name_start, *type; > + const char *ext; > > - if (bname[0] == '.') return EINA_FALSE; > - if (info->type == EINA_FILE_DIR) return EINA_FALSE; > - if ((info->type != EINA_FILE_REG)&& (info->type != EINA_FILE_UNKNOWN)) > - return EINA_FALSE; > - > - type = efreet_mime_type_get(bname); > - if (!strncmp(type, "image", 5)) > - return EINA_TRUE; > - > + ext = strrchr(info->path, '.'); > + if (ext) > + { > + if ((!strncasecmp(ext, ".jpeg", 5)) || > + (!strncasecmp(ext, ".jpg", 5)) || > + (!strncasecmp(ext, ".png", 5)) || > + (!strncasecmp(ext, ".gif", 5)) || > + (!strncasecmp(ext, ".svg", 5))) > + return EINA_TRUE; > + } > return EINA_FALSE; > } > > > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > enlightenment-svn mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
