From 5c3856bee46a79993d80fb46a506f2e1e78e9ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florent=20Cayr=C3=A9?= Date: Thu, 3 Oct 2024 10:33:26 +0200 Subject: [PATCH] [17.0][FIX] module_analysis: interpret exclude_directories as relative to module's folder Fixes #3042. --- module_analysis/models/ir_module_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module_analysis/models/ir_module_module.py b/module_analysis/models/ir_module_module.py index 8e18d28aa19..6a1228f40bd 100644 --- a/module_analysis/models/ir_module_module.py +++ b/module_analysis/models/ir_module_module.py @@ -161,7 +161,7 @@ def _get_files_to_analyse( if not path: return res for root, _, files in os.walk(path, followlinks=True): - if set(Path(root).parts) & set(exclude_directories): + if set(Path(root).relative_to(path).parts) & set(exclude_directories): continue for name in files: if name in exclude_files: