Skip to content

Commit

Permalink
Note that FsReadCloser does not follow symlinks
Browse files Browse the repository at this point in the history
Adds note to NewFsReadCloser to indicate that symbolic links will not be
honored when walking the filesystem.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
  • Loading branch information
hasheddan committed Nov 20, 2020
1 parent 1b691ef commit a521e11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/parser/fsreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func SkipNotYAML() FilterFn {

// NewFsReadCloser returns an FsReadCloser that implements io.ReadCloser. It
// walks the filesystem ahead of time, then reads file contents when Read is
// invoked.
// invoked. It does not follow symbolic links.
func NewFsReadCloser(fs afero.Fs, dir string, fns ...FilterFn) (*FsReadCloser, error) {
paths := []string{}
err := afero.Walk(fs, dir, func(path string, info os.FileInfo, err error) error {
Expand Down

0 comments on commit a521e11

Please sign in to comment.