mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Ignore directories when searching folders
This commit is contained in:
parent
6a8b97c3e5
commit
3a22496705
@ -137,6 +137,7 @@ bool GetDirContentsWorker(DirStruct* contents, char* fpath, int fnsize, const ch
|
||||
ret = true; // Too many entries, still okay
|
||||
break;
|
||||
}
|
||||
if (!recursive || (entry->type != T_DIR))
|
||||
contents->n_entries++;
|
||||
}
|
||||
if (recursive && (fno.fattrib & AM_DIR)) {
|
||||
|
@ -1221,7 +1221,7 @@ u32 GodMode() {
|
||||
// basic navigation commands
|
||||
if ((pad_state & BUTTON_A) && (curr_entry->type != T_FILE) && (curr_entry->type != T_DOTDOT)) { // for dirs
|
||||
if (switched && !(DriveType(curr_entry->path) & DRV_SEARCH)) { // search directory
|
||||
const char* optionstr[2] = { "Search files & subdirs", "Directory info" }; // search files only?
|
||||
const char* optionstr[2] = { "Search for files...", "Directory info" }; // search files only?
|
||||
char namestr[32+1];
|
||||
TruncateString(namestr, (*current_path) ? curr_entry->path : curr_entry->name, 32, 8);
|
||||
u32 user_select = ShowSelectPrompt(2, optionstr, "%s", namestr);
|
||||
|
@ -144,6 +144,9 @@ bool GetVirtualDirContents(DirStruct* contents, char* fpath, int fnsize, const c
|
||||
entry->size = vfile.size;
|
||||
entry->type = (vfile.flags & VFLAG_DIR) ? T_DIR : T_FILE;
|
||||
entry->marked = 0;
|
||||
if (contents->n_entries >= MAX_DIR_ENTRIES)
|
||||
break; // Too many entries, still okay
|
||||
if (!recursive || (entry->type != T_DIR))
|
||||
contents->n_entries++;
|
||||
}
|
||||
if (recursive && (vfile.flags & VFLAG_DIR)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user