From a47b8504d825d24c8fffa6805c9dede29eae6d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Inez?= Date: Wed, 26 Feb 2025 22:33:45 +0100 Subject: [PATCH] fix(rag_service): ignore leading slash gitignore patterns --- py/rag-service/src/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/rag-service/src/main.py b/py/rag-service/src/main.py index 9e52e6f86..1050c067f 100644 --- a/py/rag-service/src/main.py +++ b/py/rag-service/src/main.py @@ -528,7 +528,7 @@ def scan_directory(directory: Path) -> list[str]: if not spec: matched_files.extend(file_paths) continue - matched_files.extend([file for file in file_paths if not spec.match_file(file)]) + matched_files.extend([file for file in file_paths if not spec.match_file(os.path.relpath(file, directory))]) return matched_files