diff --git a/apps/filetree.c b/apps/filetree.c index e6ba08b96e..691a6adee6 100644 --- a/apps/filetree.c +++ b/apps/filetree.c @@ -218,8 +218,7 @@ int ft_load(struct tree_context* c, const char* tempdir) (((len == 1) && (!strncmp(entry->d_name, ".", 1))) || ((len == 2) && - (!strncmp(entry->d_name, "..", 2))) || - c->hidedirs)) { + (!strncmp(entry->d_name, "..", 2))))) { i--; continue; } @@ -258,19 +257,19 @@ int ft_load(struct tree_context* c, const char* tempdir) #endif /* filter out non-visible files */ - if (!(dptr->attr & ATTR_DIRECTORY) && ( + if ((!(dptr->attr & ATTR_DIRECTORY) && ( (*c->dirfilter == SHOW_PLAYLIST && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_M3U) || ((*c->dirfilter == SHOW_MUSIC && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_MPA) && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_M3U) || - (*c->dirfilter == SHOW_SUPPORTED && !filetype_supported(dptr->attr)) || + (*c->dirfilter == SHOW_SUPPORTED && !filetype_supported(dptr->attr)))) || (*c->dirfilter == SHOW_WPS && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_WPS) || (*c->dirfilter == SHOW_CFG && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_CFG) || (*c->dirfilter == SHOW_LNG && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_LNG) || (*c->dirfilter == SHOW_MOD && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_MOD) || (*c->dirfilter == SHOW_FONT && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_FONT) || - (*c->dirfilter == SHOW_PLUGINS && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_ROCK))) + (*c->dirfilter == SHOW_PLUGINS && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_ROCK)) { i--; continue; diff --git a/apps/main_menu.c b/apps/main_menu.c index 3f8ecf9594..b887ed6504 100644 --- a/apps/main_menu.c +++ b/apps/main_menu.c @@ -303,7 +303,7 @@ bool show_info(void) static bool plugin_browse(void) { - return rockbox_browse(PLUGIN_DIR, SHOW_PLUGINS, true); + return rockbox_browse(PLUGIN_DIR, SHOW_PLUGINS); } #ifdef HAVE_RECORDING diff --git a/apps/settings_menu.c b/apps/settings_menu.c index e2dda0ce8f..57b4cc897e 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c @@ -1020,17 +1020,17 @@ static bool browse_current(void) static bool custom_wps_browse(void) { - return rockbox_browse(ROCKBOX_DIR, SHOW_WPS, true); + return rockbox_browse(ROCKBOX_DIR, SHOW_WPS); } static bool custom_cfg_browse(void) { - return rockbox_browse(ROCKBOX_DIR, SHOW_CFG, true); + return rockbox_browse(ROCKBOX_DIR, SHOW_CFG); } static bool language_browse(void) { - return rockbox_browse(ROCKBOX_DIR LANG_DIR, SHOW_LNG, true); + return rockbox_browse(ROCKBOX_DIR LANG_DIR, SHOW_LNG); } static bool voice_menus(void) @@ -1092,7 +1092,7 @@ static bool voice_menu(void) #ifdef HAVE_LCD_BITMAP static bool font_browse(void) { - return rockbox_browse(ROCKBOX_DIR FONT_DIR, SHOW_FONT, true); + return rockbox_browse(ROCKBOX_DIR FONT_DIR, SHOW_FONT); } static bool scroll_bar(void) @@ -1543,7 +1543,7 @@ static bool display_settings_menu(void) static bool firmware_browse(void) { - return rockbox_browse(ROCKBOX_DIR, SHOW_MOD, true); + return rockbox_browse(ROCKBOX_DIR, SHOW_MOD); } static bool battery_settings_menu(void) diff --git a/apps/tree.c b/apps/tree.c index 1a7f1045f7..8e1afb8b67 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -1447,7 +1447,7 @@ bool create_playlist(void) return true; } -bool rockbox_browse(const char *root, int dirfilter, bool hidedirs) +bool rockbox_browse(const char *root, int dirfilter) { static struct tree_context backup; @@ -1456,7 +1456,6 @@ bool rockbox_browse(const char *root, int dirfilter, bool hidedirs) memcpy(tc.currdir, root, sizeof(tc.currdir)); start_wps = false; tc.dirfilter = &dirfilter; - tc.hidedirs = hidedirs; dirbrowse(); diff --git a/apps/tree.h b/apps/tree.h index 2e6b21dd3a..41ef0e527f 100644 --- a/apps/tree.h +++ b/apps/tree.h @@ -150,7 +150,6 @@ struct tree_context { int cursorpos[MAX_DIR_LEVELS]; char currdir[MAX_PATH]; /* file use */ int *dirfilter; /* file use */ - bool hidedirs; int filesindir; int dirsindir; /* file use */ int dirlength; /* total number of entries in dir, incl. those not loaded */ @@ -187,7 +186,7 @@ void tree_get_filetypes(const struct filetype**, int*); void tree_init(void); void browse_root(void); void set_current_file(char *path); -bool rockbox_browse(const char *root, int dirfilter, bool hidedirs); +bool rockbox_browse(const char *root, int dirfilter); bool create_playlist(void); void resume_directory(const char *dir); char *getcwd(char *buf, int size);