aboutsummaryrefslogtreecommitdiff
path: root/weed/filesys/dir_rename.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/filesys/dir_rename.go')
-rw-r--r--weed/filesys/dir_rename.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/weed/filesys/dir_rename.go b/weed/filesys/dir_rename.go
index 92d667c57..ea40f5c31 100644
--- a/weed/filesys/dir_rename.go
+++ b/weed/filesys/dir_rename.go
@@ -38,5 +38,14 @@ func (dir *Dir) Rename(ctx context.Context, req *fuse.RenameRequest, newDirector
})
+ if err == nil {
+ dir.wfs.cacheDelete(newPath)
+ dir.wfs.cacheDelete(oldPath)
+
+ // fmt.Printf("rename path: %v => %v\n", oldPath, newPath)
+ dir.wfs.fsNodeCache.Move(oldPath, newPath)
+
+ }
+
return err
}