From 7d4f8290f183abd44a6211fe9e6980a6f2583863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20T=C3=B4rres?= Date: Sun, 31 Dec 2023 03:08:27 -0800 Subject: [PATCH] replace fs.Stat with fs.Lstat --- file.go | 2 +- nfs_ongetattr.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/file.go b/file.go index 19f10e1..c3f1911 100644 --- a/file.go +++ b/file.go @@ -132,7 +132,7 @@ func ToFileAttribute(info os.FileInfo, filePath string) *FileAttribute { // tryStat attempts to create a FileAttribute from a path. func tryStat(fs billy.Filesystem, path []string) *FileAttribute { fullPath := fs.Join(path...) - attrs, err := fs.Stat(fullPath) + attrs, err := fs.Lstat(fullPath) if err != nil || attrs == nil { Log.Errorf("err loading attrs for %s: %v", fs.Join(path...), err) return nil diff --git a/nfs_ongetattr.go b/nfs_ongetattr.go index dd301f8..5ecc240 100644 --- a/nfs_ongetattr.go +++ b/nfs_ongetattr.go @@ -20,7 +20,7 @@ func onGetAttr(ctx context.Context, w *response, userHandle Handler) error { } fullPath := fs.Join(path...) - info, err := fs.Stat(fullPath) + info, err := fs.Lstat(fullPath) if err != nil { if os.IsNotExist(err) { return &NFSStatusError{NFSStatusNoEnt, err}