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.

minor

Chris Lu7726965a472f
diff --git a/weed/filesys/dir_link.go b/weed/filesys/dir_link.go
index f369187344..368ded442c 100644
--- a/weed/filesys/dir_link.go
+++ b/weed/filesys/dir_link.go
@@ -32,7 +32,7 @@ func (dir *Dir) Link(ctx context.Context, req *fuse.LinkRequest, old fs.Node) (f
}
// update old file to hardlink mode
- if oldFile.entry.HardLinkId == nil {
+ if len(oldFile.entry.HardLinkId) == 0 {
oldFile.entry.HardLinkId = util.RandomBytes(16)
oldFile.entry.HardLinkCounter = 1
}