From 3c9b9088efb017df5b110133e80d1a7a931c115f Mon Sep 17 00:00:00 2001 From: lifehackerhansol Date: Mon, 14 Oct 2024 10:06:24 -0700 Subject: [PATCH] mainlist: fix retriving attributes of file This requires a full path, but it was instead passing the file name. This caused files to only appear in the root directory. --- arm9/source/mainlist.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arm9/source/mainlist.cpp b/arm9/source/mainlist.cpp index 245698c..bb6b957 100644 --- a/arm9/source/mainlist.cpp +++ b/arm9/source/mainlist.cpp @@ -224,8 +224,7 @@ bool cMainList::enterDir(const std::string& dirName) { strcmp(entry->d_name, "..")) : extnameFilter(extNames, extName); showThis = showThis && (_showAllFiles || gs().showHiddenFiles || - !(FAT_getAttr(entry->d_name) & ATTR_HIDDEN)); - + !(FAT_getAttr((dirName + lfn).c_str()) & ATTR_HIDDEN)); // 如果有后缀名,或者是个目录,就push进去 if (showThis) { u32 row_count = getRowCount();