Browse Source

fix empty hard link id

pull/1502/head
Chris Lu 4 years ago
parent
commit
0790c6d605
  1. 2
      weed/filer/filerstore_hardlink.go

2
weed/filer/filerstore_hardlink.go

@ -24,7 +24,7 @@ func (fsw *FilerStoreWrapper) handleUpdateToHardLinks(ctx context.Context, entry
}
// remove old hard link
if err == nil && bytes.Compare(existingEntry.HardLinkId, entry.HardLinkId) != 0 {
if err == nil && len(existingEntry.HardLinkId) != 0 && bytes.Compare(existingEntry.HardLinkId, entry.HardLinkId) != 0 {
if err = fsw.DeleteHardLink(ctx, existingEntry.HardLinkId); err != nil {
return err
}

Loading…
Cancel
Save