entrance: files are now searched with eina_file instead of ecore_file

This commit is contained in:
Marcel Hollerbach 2014-05-13 15:42:57 +02:00
parent 6a0aa9f717
commit aede9bef80
1 changed files with 9 additions and 11 deletions

View File

@ -8,22 +8,20 @@ static char *_entrance_image_homedir_get(const char *usr);
static Eina_List *
_entrance_image_readdir(const char *path)
{
Eina_List *files;
Eina_Iterator *files;
Eina_List *targets = NULL;
char *filename, buf[PATH_MAX];
Eina_File_Direct_Info *file_stat;
char *buf;
files = ecore_file_ls(path);
files = eina_file_stat_ls(path);
if (!files) return NULL;
EINA_LIST_FREE(files, filename)
EINA_ITERATOR_FOREACH(files, file_stat)
{
snprintf(buf, sizeof(buf), "%s/%s", path, filename);
if ((!ecore_file_is_dir(buf)) && (filename[0] != '.'))
{
if (evas_object_image_extension_can_load_get(filename))
targets = eina_list_append(targets, eina_stringshare_add(buf));
}
buf = file_stat->path;
if (file_stat->type == EINA_FILE_REG && evas_object_image_extension_can_load_get(buf))
targets = eina_list_append(targets, eina_stringshare_add(buf));
}
eina_iterator_free(files);
return targets;
}