Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

report error if entry not found

Chris Luc00dd5e62ed7
diff --git a/weed/filesys/file.go b/weed/filesys/file.go
index db8062ceb3..a44e4d5e26 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)