diff --git a/legacy/eina/src/include/eina_file.h b/legacy/eina/src/include/eina_file.h index 30425aec1e..0452b79960 100644 --- a/legacy/eina/src/include/eina_file.h +++ b/legacy/eina/src/include/eina_file.h @@ -76,7 +76,6 @@ struct _Eina_File_Direct_Info size_t name_length; /**< size of the filename/basename component */ size_t name_start; /**< where the filename/basename component starts */ char path[PATH_MAX]; /**< the path */ - const struct dirent *dirent; /**< the dirent structure of the path - don't use this if you want compatibility */ Eina_File_Type type; /**< file type */ }; diff --git a/legacy/eina/src/lib/eina_file.c b/legacy/eina/src/lib/eina_file.c index 4c32d75397..af6f65cbff 100644 --- a/legacy/eina/src/lib/eina_file.c +++ b/legacy/eina/src/lib/eina_file.c @@ -101,11 +101,11 @@ _eina_file_ls_iterator_next(Eina_File_Iterator *it, void **data) ((dp->d_name[1] == '\0') || ((dp->d_name[1] == '.') && (dp->d_name[2] == '\0')))); -#ifdef _DIRENT_HAVE_D_NAMLEN +#ifdef _DIRENT_HAVE_D_NAMLEN length = dp->d_namlen; #else length = strlen(dp->d_name); -#endif +#endif name = alloca(length + 2 + it->length); memcpy(name, it->dir, it->length); @@ -162,11 +162,11 @@ _eina_file_direct_ls_iterator_next(Eina_File_Direct_Iterator *it, void **data) if (!dp) return EINA_FALSE; -#ifdef _DIRENT_HAVE_D_NAMLEN +#ifdef _DIRENT_HAVE_D_NAMLEN length = dp->d_namlen; #else length = strlen(dp->d_name); -#endif +#endif if (it->info.name_start + length + 1 >= PATH_MAX) continue; } @@ -178,7 +178,7 @@ _eina_file_direct_ls_iterator_next(Eina_File_Direct_Iterator *it, void **data) it->info.name_length = length; it->info.path_length = it->info.name_start + length; it->info.path[it->info.path_length] = '\0'; - it->info.dirent = dp; + #ifdef _DIRENT_HAVE_D_TYPE switch (dp->d_type) { diff --git a/legacy/eio/src/lib/eio_file.c b/legacy/eio/src/lib/eio_file.c index f94a2ba29c..dfcc021c08 100644 --- a/legacy/eio/src/lib/eio_file.c +++ b/legacy/eio/src/lib/eio_file.c @@ -188,8 +188,6 @@ _eio_file_direct_heavy(Ecore_Thread *thread, void *data) if (!send) continue; memcpy(send, info, sizeof (Eina_File_Direct_Info)); - send->dirent = (struct dirent*)(send + 1); - memcpy((void*) send->dirent, info->dirent, sizeof (struct dirent)); ecore_thread_feedback(thread, send); } diff --git a/legacy/eio/src/lib/eio_main.c b/legacy/eio/src/lib/eio_main.c index 027e419f96..98093ebb93 100644 --- a/legacy/eio/src/lib/eio_main.c +++ b/legacy/eio/src/lib/eio_main.c @@ -145,7 +145,7 @@ eio_progress_send(Ecore_Thread *thread, Eio_File_Progress *op, off_t current, of Eina_File_Direct_Info * eio_direct_info_malloc(void) { - return _eio_pool_malloc(&direct_info, sizeof (Eina_File_Direct_Info) + sizeof (struct dirent)); + return _eio_pool_malloc(&direct_info, sizeof (Eina_File_Direct_Info)); } void