mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-20 04:29:23 +08:00
rename: set new name for renamed files
This commit is contained in:
@@ -94,6 +94,12 @@ func (c *FsCache) Move(oldPath util.FullPath, newPath util.FullPath) *FsNode {
|
|||||||
if dir, ok := src.node.(*Dir); ok {
|
if dir, ok := src.node.(*Dir); ok {
|
||||||
dir.name = target.name // target is not Dir, but a shortcut
|
dir.name = target.name // target is not Dir, but a shortcut
|
||||||
}
|
}
|
||||||
|
if f, ok := src.node.(*File); ok {
|
||||||
|
f.Name = target.name // target is not Dir, but a shortcut
|
||||||
|
if f.entry != nil {
|
||||||
|
f.entry.Name = f.Name
|
||||||
|
}
|
||||||
|
}
|
||||||
parent.disconnectChild(target)
|
parent.disconnectChild(target)
|
||||||
|
|
||||||
target.deleteSelf()
|
target.deleteSelf()
|
||||||
|
Reference in New Issue
Block a user