From 67b0645808f853b8c6a88002edb0dbf796a092c5 Mon Sep 17 00:00:00 2001 From: chrislu Date: Wed, 5 Jan 2022 21:27:41 -0800 Subject: [PATCH] mount: need to change entry name after renaming --- weed/filesys/dir_rename.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/weed/filesys/dir_rename.go b/weed/filesys/dir_rename.go index d8ea3e459..539ee67d2 100644 --- a/weed/filesys/dir_rename.go +++ b/weed/filesys/dir_rename.go @@ -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()