forked from enlightenment/efl
elementary: use the right iterator to do the right work.
NOTE: do not use eina_file_direct_ls, if you don't understand its optimisation. SVN revision: 69043
This commit is contained in:
parent
275098b6bf
commit
3479a4feb5
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue