aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/finder/plugin/searcher/file/name.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/packages/finder/plugin/searcher/file/name.py b/packages/finder/plugin/searcher/file/name.py
index 97bba89..5f6fde5 100644
--- a/packages/finder/plugin/searcher/file/name.py
+++ b/packages/finder/plugin/searcher/file/name.py
@@ -32,19 +32,26 @@ class FinderPluginFileNameSearcher():
self.items = []
async def finder(self):
- path = self.path
+ path = self.path
+ ignore_folders = [ '.git', '__pycache__' ]
+ ignore_files = [ '.gitignore' ]
for parent, dirs, files in os.walk(self.path):
- # Ignore Git folders
- if '.git' in dirs:
- dirs.remove('.git')
- continue
+ # Ignore folders
+ for ignore_folder in ignore_folders:
+ if ignore_folder in dirs:
+ dirs.remove(ignore_folder)
# Currently we're not listing folders
#for folder in dirs:
# self.items.append(os.path.join(parent, folder))
for file in files:
+ # Ignore files
+ for ignore_file in ignore_files:
+ if file == ignore_file:
+ continue
+
self.items.append(os.path.join(parent, file))
return self.items