cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=5fda18c5556599313dca5b15ebc11bc2557fa308
commit 5fda18c5556599313dca5b15ebc11bc2557fa308 Author: j_yong.hwang <j_yong.hw...@samsung.com> Date: Tue Aug 4 15:39:36 2015 +0200 elm_theme: string function change for the exceptional file name Summary: If name of theme has ".",example "abc.def.edj", it would fail to check the file name. So, I changed the strchr functions to strrchr function. Reviewers: seoz, raster, Hermet, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2285 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elm_theme.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/lib/elm_theme.c b/src/lib/elm_theme.c index 58b7514..3e9f90e 100644 --- a/src/lib/elm_theme.c +++ b/src/lib/elm_theme.c @@ -771,11 +771,10 @@ elm_theme_name_available_list_new(void) snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/themes/%s", home, file); if ((!ecore_file_is_dir(buf)) && (ecore_file_size(buf) > 0)) { - s = strchr(file, '.'); - if ((s) && (!strcasecmp(s, ".edj"))) + if (eina_str_has_extension(file, "edj")) { th = strdup(file); - s = strchr(th, '.'); + s = strrchr(th, '.'); *s = 0; list = eina_list_append(list, th); } @@ -790,13 +789,12 @@ elm_theme_name_available_list_new(void) snprintf(buf, sizeof(buf), "%s/themes/%s", _elm_data_dir, file); if ((!ecore_file_is_dir(buf)) && (ecore_file_size(buf) > 0)) { - s = strchr(file, '.'); - if ((s) && (!strcasecmp(s, ".edj"))) + if (eina_str_has_extension(file, "edj")) { int dupp; th = strdup(file); - s = strchr(th, '.'); + s = strrchr(th, '.'); *s = 0; dupp = 0; EINA_LIST_FOREACH(list, l, s) --