From 2ecc926e8b983b25ab488611bd7cf56cbcad5cb8 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 23 Nov 2012 20:21:05 +0100 Subject: [PATCH] (PSP1) Add workaround for d_type missing in PSP1 dirent (but d_stat instead can serve as a substitute) --- file_path.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/file_path.c b/file_path.c index d204d88c2e..2b54dab2e3 100644 --- a/file_path.c +++ b/file_path.c @@ -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;