Skip to content

fix: follow symlinks to directories in glob pattern matching#5502

Merged
nichmor merged 1 commit intoprefix-dev:mainfrom
baszalmstra:claude/fix-walkbuilder-symlinks-2qx76
Feb 18, 2026
Merged

fix: follow symlinks to directories in glob pattern matching#5502
nichmor merged 1 commit intoprefix-dev:mainfrom
baszalmstra:claude/fix-walkbuilder-symlinks-2qx76

Conversation

@baszalmstra
Copy link
Contributor

Description

Enable symlink following in the glob pattern walker to discover files inside symlinked directories. This fixes an issue where glob patterns like ** would not match files located within symlinked directories.

The change is minimal and focused:

  • Enable follow_links(true) on the ignore::WalkBuilder to traverse symlinked directories
  • Add a test case that verifies symlinks to directories are properly followed

Fixes #5417

How Has This Been Tested?

Added a new test symlink_to_directory_is_followed that:

  1. Creates a real directory with files outside the search root
  2. Creates a symlink inside the search root pointing to that directory
  3. Verifies that glob pattern ** discovers both regular files and files within the symlinked directory

The test is Unix-only (marked with #[cfg(unix)]) since symlink creation differs across platforms.

AI Disclosure

Written by Claude Code Opus 4.6 Extended.

Checklist:

  • I have performed a self-review of my own code
  • I have added sufficient tests to cover my changes

Enable `follow_links(true)` on the `ignore::WalkBuilder` so that
symlinks pointing to directories are traversed instead of being
reported as opaque entries. Without this, a symlinked directory was
returned as a file-like entry, causing "Is a directory (os error 21)"
when downstream code attempted to read it.

Closes prefix-dev#5417

https://claude.ai/code/session_01MmEyYFc57asgHgTTBV8nAr
@nichmor nichmor merged commit 14eca55 into prefix-dev:main Feb 18, 2026
37 checks passed
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.

Error in tasks.*.inputs and tasks.*.outputs with symlinks to folders

3 participants