rename: handle hard links

This commit is contained in:
chrislu 2022-02-24 02:59:00 -08:00
parent e31ec04f4f
commit b05962b90e

View file

@ -9,13 +9,17 @@ import (
)
func (fsw *FilerStoreWrapper) handleUpdateToHardLinks(ctx context.Context, entry *Entry) error {
if len(entry.HardLinkId) == 0 {
if entry.IsDirectory() {
return nil
}
if len(entry.HardLinkId) > 0 {
// handle hard links
if err := fsw.setHardLink(ctx, entry); err != nil {
return fmt.Errorf("setHardLink %d: %v", entry.HardLinkId, err)
}
}
// check what is existing entry
glog.V(4).Infof("handleUpdateToHardLinks FindEntry %s", entry.FullPath)