(PSP1) Add workaround for d_type missing in PSP1 dirent (but

d_stat instead can serve as a substitute)
This commit is contained in:
twinaphex 2012-11-23 20:21:05 +01:00
parent 770ac5a15a
commit 2ecc926e8b

View File

@ -289,7 +289,11 @@ struct string_list *dir_list_new(const char *dir, const char *ext, bool include_
{
const char *name = entry->d_name;
const char *file_ext = path_get_extension(name);
#ifdef PSP
bool is_dir = ((entry->d_stat.st_attr & FIO_SO_IFDIR) == FIO_SO_IFDIR);
#else
bool is_dir = entry->d_type == DT_DIR;
#endif
if (!include_dirs && is_dir)
continue;