fix(ignore, fs): allow loading ignore patterns behind symlink (fixes #10785) (#10786)

The recent change to disallow following symlinks by default conflicts
with the expected behavior of .stignore. This adds a new flag which may
be passed to OpenFile to skip default symlink-forbidding open flag.

---------

Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
Jakob Borg
2026-07-16 09:19:13 +08:00
committed by GitHub
parent d4cffd848e
commit c1d8045d86
6 changed files with 60 additions and 5 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ import (
"syscall"
)
const alwaysOpenFlags = syscall.O_NOFOLLOW // never open symlinks as the final path component
const optNoFollow = syscall.O_NOFOLLOW
func (f *BasicFilesystem) CreateSymlink(target, name string) error {
name, err := f.rooted(name)