Skip to content

Fix search.py: BSD grep requires trailing slash to recurse into symlinked directories#27

Merged
ali5ter merged 1 commit into
mainfrom
fix/search-symlink-trailing-slash
Apr 13, 2026
Merged

Fix search.py: BSD grep requires trailing slash to recurse into symlinked directories#27
ali5ter merged 1 commit into
mainfrom
fix/search-symlink-trailing-slash

Conversation

@ali5ter
Copy link
Copy Markdown
Owner

@ali5ter ali5ter commented Apr 13, 2026

Summary

  • BSD grep on macOS does not recurse into a symlinked directory unless the path ends with a trailing slash
  • Without this fix, search.py returns no results for any collection whose indexed/ directory is a symlink to cloud storage
  • Adds + "/" to both grep calls in search_indexed (line 40) and files_matching (line 76)

Test plan

  • Run python3 search.py "term" against a collection whose indexed/ is a symlink — confirm results are returned
  • Run the same search against a non-symlinked collection — confirm no regression

🤖 Generated with Claude Code

…nked directories

macOS BSD grep does not recurse into a symlinked directory unless the
path ends with a trailing slash. Add "/" to both grep calls so search
returns results for collections whose indexed/ dir is a symlink.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ali5ter ali5ter merged commit 3c3acc6 into main Apr 13, 2026
1 check passed
@ali5ter ali5ter deleted the fix/search-symlink-trailing-slash branch April 19, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant