diff options
author | Lucas CHOLLET <lucas.chollet@free.fr> | 2022-01-03 23:23:03 +0100 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2022-01-05 15:20:54 -0800 |
commit | 75d1840cfc255e1a71d78bab91039a682f960334 (patch) | |
tree | dc6ca256520f91a355495406f39dd1a0afc68166 /Userland/Applications/FileManager | |
parent | 693ae736062ec88798ae7c536b2a02234e620b4b (diff) | |
download | serenity-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.cpp | 4 |
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)); |