summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/FileSystemModel.cpp
diff options
context:
space:
mode:
authorofftkp <parisoplop@gmail.com>2022-05-07 19:15:05 +0300
committerLinus Groh <mail@linusgroh.de>2022-05-07 20:31:40 +0200
commitd24ec130bfb4a4e3c83174b65aa0e31e612430cc (patch)
tree569aa716d7288a566ee6e3ac7eb48a95e4cb8b12 /Userland/Libraries/LibGUI/FileSystemModel.cpp
parentd4fe02152a55601be285f8e9acef04c28bb5444b (diff)
downloadserenity-d24ec130bfb4a4e3c83174b65aa0e31e612430cc.zip
FileManager: Don't show new dotfiles if the option is disabled
Diffstat (limited to 'Userland/Libraries/LibGUI/FileSystemModel.cpp')
-rw-r--r--Userland/Libraries/LibGUI/FileSystemModel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/FileSystemModel.cpp b/Userland/Libraries/LibGUI/FileSystemModel.cpp
index db273ab797..1a3539eeea 100644
--- a/Userland/Libraries/LibGUI/FileSystemModel.cpp
+++ b/Userland/Libraries/LibGUI/FileSystemModel.cpp
@@ -384,6 +384,8 @@ void FileSystemModel::handle_file_event(Core::FileWatcherEvent const& event)
LexicalPath path { event.event_path };
auto& parts = path.parts_view();
StringView child_name = parts.last();
+ if (!m_should_show_dotfiles && child_name.starts_with("."))
+ break;
auto parent_name = path.parent().string();
auto parent = node_for_path(parent_name);