firmware: case-insensitive system directory hiding
This commit is contained in:
parent
b01388b670
commit
11bf7ffd5b
@ -140,7 +140,7 @@ uint32_t scan_dir(char* path, FILINFO* fno_param, char mkdb, uint32_t this_dir_t
|
||||
break;
|
||||
}
|
||||
fn = *fno.lfname ? fno.lfname : fno.fname;
|
||||
if ((*fn == '.') || !(memcmp(fn, SYS_DIR_NAME, sizeof(SYS_DIR_NAME)))) continue;
|
||||
if ((*fn == '.') || !(strncasecmp(fn, SYS_DIR_NAME, sizeof(SYS_DIR_NAME)))) continue;
|
||||
if (fno.fattrib & AM_DIR) {
|
||||
depth++;
|
||||
if(depth < FS_MAX_DEPTH) {
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
#include "ff.h"
|
||||
|
||||
#define FS_MAX_DEPTH (10)
|
||||
#define SYS_DIR_NAME ((const uint8_t*)"sd2snes")
|
||||
#define SYS_DIR_NAME ((const char*)"sd2snes")
|
||||
typedef enum {
|
||||
TYPE_UNKNOWN = 0, /* 0 */
|
||||
TYPE_SMC, /* 1 */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user