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.
This commit is contained in:
lifehackerhansol 2024-10-14 10:06:24 -07:00
parent 12737bfbe2
commit 3c9b9088ef
No known key found for this signature in database
GPG Key ID: 80FB184AFC0B3B0E

View File

@ -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();