elementary: use the right iterator to do the right work.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 8 Mar 2012 09:43:33 +0000 (09:43 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 8 Mar 2012 09:43:33 +0000 (09:43 +0000)
NOTE: do not use eina_file_direct_ls, if you don't understand its
optimisation.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@69043 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_config.c

index a866bf5..73aeb06 100644 (file)
@@ -572,7 +572,7 @@ _elm_config_profiles_list(void)
 
    len = _elm_user_dir_snprintf(buf, sizeof(buf), "config");
 
-   file_it = eina_file_direct_ls(buf);
+   file_it = eina_file_stat_ls(buf);
    if (!file_it)
      goto sys;
 
@@ -583,13 +583,6 @@ _elm_config_profiles_list(void)
 
    EINA_ITERATOR_FOREACH(file_it, info)
      {
-        Eina_Stat st;
-
-        if (eina_file_statat(eina_iterator_container_get(file_it), info, &st))
-          {
-             ERR("this is bad.");
-             continue;
-          }
         if (info->name_length >= len)
           continue;