diff --git a/weed/filesys/dir_link.go b/weed/filesys/dir_link.go index f36918734..368ded442 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 }