From 7bf86d8aa2afbda36c347ed2e5d59635c902c376 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 26 Jul 2024 07:59:18 -0300 Subject: Fix: plugin: opener: searcher: do not traverse hidden folders --- packages/finder/plugin/searcher/file/name.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/finder/plugin/searcher/file/name.py b/packages/finder/plugin/searcher/file/name.py index b1ae939..3fce4ac 100644 --- a/packages/finder/plugin/searcher/file/name.py +++ b/packages/finder/plugin/searcher/file/name.py @@ -41,11 +41,16 @@ class FinderPluginFileNameSearcher(): ignore_files = [ '.gitignore', '.gitattributes', '.gitmodules' ] for parent, dirs, files in os.walk(self.path): - # Ignore folders + # Do not traverse some folders for ignore_folder in ignore_folders: if ignore_folder in dirs: dirs.remove(ignore_folder) + # Do not traverse hidden folders + for folder in dirs: + if folder.startswith('.'): + dirs.remove(folder) + # Currently we're not listing folders #for folder in dirs: # self.items.append(os.path.join(parent, folder)) -- cgit v1.2.3