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:
@@ -357,8 +357,8 @@ func hashPatterns(patterns []Pattern) string {
|
||||
return hex.EncodeToString(h.Sum(nil))
|
||||
}
|
||||
|
||||
func loadIgnoreFile(fs fs.Filesystem, file string) (fs.File, fs.FileInfo, error) {
|
||||
fd, err := fs.Open(file)
|
||||
func loadIgnoreFile(ffs fs.Filesystem, file string) (fs.File, fs.FileInfo, error) {
|
||||
fd, err := ffs.OpenFile(file, fs.OptReadOnly|fs.OptFollow, 0o666)
|
||||
if err != nil {
|
||||
return fd, nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user