diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2024-07-26 07:59:18 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2024-07-26 07:59:18 -0300 |
commit | 7bf86d8aa2afbda36c347ed2e5d59635c902c376 (patch) | |
tree | 543c3241310067750c7ca7ed096ca9893814eafb /packages | |
parent | 7b157a1a0e9e35ef8469faf9f5950df31a9a5d55 (diff) | |
download | finder-7bf86d8aa2afbda36c347ed2e5d59635c902c376.tar.gz finder-7bf86d8aa2afbda36c347ed2e5d59635c902c376.tar.bz2 |
Fix: plugin: opener: searcher: do not traverse hidden folders
Diffstat (limited to 'packages')
-rw-r--r-- | packages/finder/plugin/searcher/file/name.py | 7 |
1 files changed, 6 insertions, 1 deletions
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)) |