diff --git a/module_analysis/models/ir_module_module.py b/module_analysis/models/ir_module_module.py index 81dc07ab75c..b44fe404caa 100644 --- a/module_analysis/models/ir_module_module.py +++ b/module_analysis/models/ir_module_module.py @@ -164,9 +164,9 @@ def _get_files_to_analyse( if not path: return res for root, dirs, files in os.walk(path, followlinks=True): - if set(Path(root).parts) & set(exclude_directories): - continue for name in files: + if set(Path(name).parts) & set(exclude_directories): + continue if name in exclude_files: continue filename, file_extension = os.path.splitext(name)