When using eio_file_stat_ls() (or any other exposing Eio_File *handler),
it will not be possible to use it from the main callback due to eio
freeing data too fast from the thread.
Moved frees from _eio_file_eina_ls_heavy() to eio_async_end() to be
sure that all the calls to main callback are over.
This implied adding the Eina_Iterator from eina_file_stat_ls to
the _Eio_File_Ls structure.
if (pack) ecore_thread_feedback(thread, pack);
- eio_file_container_set(&async->ls.common, NULL);
-
- eina_iterator_free(ls);
+ async->ls.ls = ls;
}
static void
Eio_File_Ls *async = data;
async->common.done_cb((void*) async->common.data, &async->common);
-
+ eio_file_container_set(&async->common, NULL);
+ eina_iterator_free(async->ls);
eio_async_free(async);
}
{
Eio_File common;
const char *directory;
+ Eina_Iterator *ls;
};
struct _Eio_File_Direct_Ls