mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
mount: need to change entry name after renaming
This commit is contained in:
parent
4de060daa6
commit
67b0645808
|
@ -114,6 +114,8 @@ func (dir *Dir) handleRenameResponse(ctx context.Context, resp *filer_pb.StreamR
|
||||||
if existingHandle, found := dir.wfs.handles[inodeId]; found && existingHandle != nil {
|
if existingHandle, found := dir.wfs.handles[inodeId]; found && existingHandle != nil {
|
||||||
glog.V(4).Infof("opened file handle %s => %s", oldPath, newPath)
|
glog.V(4).Infof("opened file handle %s => %s", oldPath, newPath)
|
||||||
delete(dir.wfs.handles, inodeId)
|
delete(dir.wfs.handles, inodeId)
|
||||||
|
existingHandle.handle = newPath.AsInode()
|
||||||
|
existingHandle.f.entry.Name = newName
|
||||||
dir.wfs.handles[newPath.AsInode()] = existingHandle
|
dir.wfs.handles[newPath.AsInode()] = existingHandle
|
||||||
}
|
}
|
||||||
dir.wfs.handlesLock.Unlock()
|
dir.wfs.handlesLock.Unlock()
|
||||||
|
|
Loading…
Reference in a new issue