1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-06-02 16:50:25 +02:00

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,12 +9,16 @@ import (
)
func (fsw *FilerStoreWrapper) handleUpdateToHardLinks(ctx context.Context, entry *Entry) error {
if len(entry.HardLinkId) == 0 {
if entry.IsDirectory() {
return nil
}
// handle hard links
if err := fsw.setHardLink(ctx, entry); err != nil {
return fmt.Errorf("setHardLink %d: %v", entry.HardLinkId, err)
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