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.

avoid possible nil attributes

chrislu3ab2c0e5c026
diff --git a/weed/mount/weedfs.go b/weed/mount/weedfs.go
index 1699254279..2e22e3589a 100644
--- a/weed/mount/weedfs.go
+++ b/weed/mount/weedfs.go
@@ -131,6 +131,9 @@ func (wfs *WFS) maybeReadEntry(inode uint64) (path util.FullPath, fh *FileHandle
}
var found bool
if fh, found = wfs.fhmap.FindFileHandle(inode); found {
+ if fh.entry.Attributes == nil {
+ fh.entry.Attributes = &filer_pb.FuseAttributes{}
+ }
return path, fh, fh.entry, fuse.OK
}
entry, status = wfs.maybeLoadEntry(path)