From 5f43dcc02d2a315ac2bfb2fdb793f581ea733836 Mon Sep 17 00:00:00 2001 From: d0k3 Date: Tue, 24 Oct 2017 23:58:41 +0200 Subject: [PATCH] Also ignore "._" in file selector --- source/filesys/fsutil.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/filesys/fsutil.c b/source/filesys/fsutil.c index 1c047c5..a520999 100644 --- a/source/filesys/fsutil.c +++ b/source/filesys/fsutil.c @@ -683,8 +683,9 @@ bool FileSelector(char* result, const char* text, const char* path, const char* u32 n_opt = 0; for (; pos < contents->n_entries; pos++) { DirEntry* entry = &(contents->entry[pos]); - if (!((entry->type == T_DIR) && (!no_dirs)) && - !((entry->type == T_FILE) && (fvx_match_name(entry->name, pattern) == FR_OK))) + if (((entry->type == T_DIR) && no_dirs) || + ((entry->type == T_FILE) && (fvx_match_name(entry->name, pattern) != FR_OK)) || + (entry->type == T_DOTDOT) || (strncmp(entry->name, "._", 2) == 0)) continue; if (n_opt == _MAX_FS_OPT) { snprintf(opt_names[n_opt++], 32, "[more...]");