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
@@ -19,7 +19,7 @@ import (
"golang.org/x/sys/windows"
)
const alwaysOpenFlags = 0 // no extra flags
const optNoFollow = 0 // not defined for Windows
var errNotSupported = errors.New("symlinks not supported")