mount: need to change entry name after renaming

This commit is contained in:
chrislu 2022-01-05 21:27:41 -08:00
parent 4de060daa6
commit 67b0645808

View file

@ -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 {
glog.V(4).Infof("opened file handle %s => %s", oldPath, newPath)
delete(dir.wfs.handles, inodeId)
existingHandle.handle = newPath.AsInode()
existingHandle.f.entry.Name = newName
dir.wfs.handles[newPath.AsInode()] = existingHandle
}
dir.wfs.handlesLock.Unlock()