Skip to content

Commit

Permalink
Enforce "show hidden files" in browser worker
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL committed Mar 21, 2024
1 parent cee0a22 commit 513c6b8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions applications/main/archive/helpers/archive_browser.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,9 +585,7 @@ void archive_switch_tab(ArchiveBrowserView* browser, InputKey key) {
bool is_browser = !strcmp(archive_get_tab_ext(tab), "*");
bool skip_assets = !is_browser;
// Hide dot files everywhere except Browser if in debug mode
bool hide_dot_files = !is_browser ? true :
tab == ArchiveTabInternal ? false :
!momentum_settings.show_hidden_files;
bool hide_dot_files = !is_browser ? true : tab == ArchiveTabInternal ? false : true;
archive_file_browser_set_path(
browser, browser->path, archive_get_tab_ext(tab), skip_assets, hide_dot_files);
tab_empty = false; // Empty check will be performed later
Expand Down
3 changes: 2 additions & 1 deletion applications/services/gui/modules/file_browser_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <core/check.h>
#include <core/common_defines.h>
#include <furi.h>
#include <momentum/momentum.h>

#include <m-array.h>
#include <stdbool.h>
Expand Down Expand Up @@ -111,7 +112,7 @@ static void browser_parse_ext_filter(ExtFilterArray_t ext_filter, const char* fi

static bool browser_filter_by_name(BrowserWorker* browser, FuriString* name, bool is_folder) {
// Skip dot files if enabled
if(browser->hide_dot_files) {
if(browser->hide_dot_files && !momentum_settings.show_hidden_files) {
if(furi_string_start_with_str(name, ".")) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static void
const DialogsFileBrowserOptions browser_options = {
.extension = extension,
.icon = &I_unknown_10px,
.hide_dot_files = !momentum_settings.show_hidden_files,
.hide_dot_files = true,
.skip_assets = true,
.hide_ext = hide_ext,
.item_loader_callback = keybinds_fap_selector_item_callback,
Expand Down

0 comments on commit 513c6b8

Please sign in to comment.