mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-21 20:22:43 +00:00
Optimize dir reading on Unix.
This commit is contained in:
parent
f81c9c3166
commit
e252ab8f61
@ -265,12 +265,13 @@ char **dir_list_new(const char *dir, const char *ext, bool include_dirs)
|
||||
{
|
||||
const char *name = entry->d_name;
|
||||
const char *file_ext = path_get_extension(name);
|
||||
bool is_dir = entry->d_type == DT_DIR;
|
||||
|
||||
if (!include_dirs && path_is_directory(name))
|
||||
if (!include_dirs && is_dir)
|
||||
continue;
|
||||
|
||||
#ifndef __CELLOS_LV2__
|
||||
if (!path_is_directory(name) && ext_list && !string_list_find_elem(ext_list, file_ext))
|
||||
if (!is_dir && ext_list && !string_list_find_elem(ext_list, file_ext))
|
||||
continue;
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user