From c00dd5e62ed72e42545d6b74dd6073b84c722743 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 16 Mar 2021 02:55:49 -0700 Subject: [PATCH] report error if entry not found --- weed/filesys/file.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/weed/filesys/file.go b/weed/filesys/file.go index db8062ceb..a44e4d5e2 100644 --- a/weed/filesys/file.go +++ b/weed/filesys/file.go @@ -56,6 +56,10 @@ func (file *File) Attr(ctx context.Context, attr *fuse.Attr) (err error) { } } + if entry == nil { + return fuse.ENOENT + } + // attr.Inode = file.fullpath().AsInode() attr.Valid = time.Second attr.Mode = os.FileMode(entry.Attr.Mode)