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.

mount: fix truncate operation

chrislu8a880a139d81
diff --git a/weed/mount/weedfs_attr.go b/weed/mount/weedfs_attr.go
index 07f814ba18..3ef36c4927 100644
--- a/weed/mount/weedfs_attr.go
+++ b/weed/mount/weedfs_attr.go
@@ -68,6 +68,8 @@ func (wfs *WFS) SetAttr(cancel <-chan struct{}, input *fuse.SetAttrIn, out *fuse
glog.V(4).Infof("truncated whole chunk %+v\n", chunk.GetFileIdString())
truncatedChunks = append(truncatedChunks, chunk)
}
+ } else {
+ chunks = append(chunks, chunk)
}
}
// set the new chunks and reset entry cache