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