Skip to content

Commit 578b735

Browse files
authored
Merge pull request #128 from t0rr3sp3dr0/master
Use fs.Lstat when stat'ing files
2 parents 0ee6f52 + 7d4f829 commit 578b735

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func ToFileAttribute(info os.FileInfo, filePath string) *FileAttribute {
132132
// tryStat attempts to create a FileAttribute from a path.
133133
func tryStat(fs billy.Filesystem, path []string) *FileAttribute {
134134
fullPath := fs.Join(path...)
135-
attrs, err := fs.Stat(fullPath)
135+
attrs, err := fs.Lstat(fullPath)
136136
if err != nil || attrs == nil {
137137
Log.Errorf("err loading attrs for %s: %v", fs.Join(path...), err)
138138
return nil

nfs_ongetattr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func onGetAttr(ctx context.Context, w *response, userHandle Handler) error {
2020
}
2121

2222
fullPath := fs.Join(path...)
23-
info, err := fs.Stat(fullPath)
23+
info, err := fs.Lstat(fullPath)
2424
if err != nil {
2525
if os.IsNotExist(err) {
2626
return &NFSStatusError{NFSStatusNoEnt, err}

0 commit comments

Comments
 (0)