rename: handle hard links
This commit is contained in:
@@ -9,12 +9,16 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (fsw *FilerStoreWrapper) handleUpdateToHardLinks(ctx context.Context, entry *Entry) error {
|
func (fsw *FilerStoreWrapper) handleUpdateToHardLinks(ctx context.Context, entry *Entry) error {
|
||||||
if len(entry.HardLinkId) == 0 {
|
|
||||||
|
if entry.IsDirectory() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// handle hard links
|
|
||||||
if err := fsw.setHardLink(ctx, entry); err != nil {
|
if len(entry.HardLinkId) > 0 {
|
||||||
return fmt.Errorf("setHardLink %d: %v", entry.HardLinkId, err)
|
// 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
|
// check what is existing entry
|
||||||
|
|||||||
Reference in New Issue
Block a user