From 0e53f58fb8368eb60a0d092b343435678d1d168f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florent=20Cayr=C3=A9?= Date: Thu, 3 Oct 2024 09:52:42 +0200 Subject: [PATCH] [12.0][FIX] module_analysis: interpret exclude_directories as relative to module's folder Fixes #3042 --- module_analysis/models/ir_module_module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)