summaryrefslogtreecommitdiff
path: root/Userland/Applications/FileManager
diff options
context:
space:
mode:
authorLucas CHOLLET <lucas.chollet@free.fr>2022-01-03 23:23:03 +0100
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-01-05 15:20:54 -0800
commit75d1840cfc255e1a71d78bab91039a682f960334 (patch)
treedc6ca256520f91a355495406f39dd1a0afc68166 /Userland/Applications/FileManager
parent693ae736062ec88798ae7c536b2a02234e620b4b (diff)
downloadserenity-75d1840cfc255e1a71d78bab91039a682f960334.zip
FileManager: Show Dotfiles when passing a Dotfile as an argument
Before this patch, FileManager was failing to open the directory and open `/` instead.
Diffstat (limited to 'Userland/Applications/FileManager')
-rw-r--r--Userland/Applications/FileManager/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Applications/FileManager/main.cpp b/Userland/Applications/FileManager/main.cpp
index 0dc29f7715..76767218c4 100644
--- a/Userland/Applications/FileManager/main.cpp
+++ b/Userland/Applications/FileManager/main.cpp
@@ -951,6 +951,10 @@ ErrorOr<int> run_in_windowed_mode(String const& initial_location, String const&
directory_view->set_should_show_dotfiles(show_dotfiles);
action_show_dotfiles->set_checked(show_dotfiles);
+ auto const initial_location_contains_dotfile = initial_location.contains("/."sv);
+ action_show_dotfiles->set_checked(initial_location_contains_dotfile);
+ action_show_dotfiles->on_activation(action_show_dotfiles);
+
auto view_menu = TRY(window->try_add_menu("&View"));
auto layout_menu = TRY(view_menu->try_add_submenu("&Layout"));
TRY(layout_menu->try_add_action(*layout_toolbar_action));