aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-03-16 02:55:49 -0700
committerChris Lu <chris.lu@gmail.com>2021-03-16 02:55:49 -0700
commitc00dd5e62ed72e42545d6b74dd6073b84c722743 (patch)
treea4c0d9dffa25b295ee4675402553c560f03644a7
parent91a3ac9731f646ce41b62bb4cd1768e5ce2342e2 (diff)
downloadseaweedfs-c00dd5e62ed72e42545d6b74dd6073b84c722743.tar.xz
seaweedfs-c00dd5e62ed72e42545d6b74dd6073b84c722743.zip
report error if entry not found
-rw-r--r--weed/filesys/file.go4
1 files changed, 4 insertions, 0 deletions
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)