Browse Source

mount: need to change entry name after renaming

pull/2564/head
chrislu 3 years ago
parent
commit
67b0645808
  1. 2
      weed/filesys/dir_rename.go

2
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()

Loading…
Cancel
Save