From 00c44e39808083065434593da96c815a241e0de6 Mon Sep 17 00:00:00 2001 From: yichuan520030910320 Date: Mon, 1 Sep 2025 16:53:09 -0700 Subject: [PATCH] [cli] fix # 81 --- packages/leann-core/src/leann/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/leann-core/src/leann/cli.py b/packages/leann-core/src/leann/cli.py index 1d2f6e9..caad276 100644 --- a/packages/leann-core/src/leann/cli.py +++ b/packages/leann-core/src/leann/cli.py @@ -1073,7 +1073,9 @@ Examples: try: # Ensure both paths are resolved before computing relativity file_path_resolved = file_path.resolve() - relative_path = file_path_resolved.relative_to(docs_path) + # Determine directory scope using the non-resolved path to avoid + # misclassifying symlinked entries as outside the docs directory + relative_path = file_path.relative_to(docs_path) if not include_hidden and _path_has_hidden_segment(relative_path): continue # Use absolute path for gitignore matching