Browse Source

avoid changing inode

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

1
weed/filesys/dir_rename.go

@ -114,7 +114,6 @@ 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 existingHandle.f.entry.Name = newName
dir.wfs.handles[newPath.AsInode()] = existingHandle dir.wfs.handles[newPath.AsInode()] = existingHandle
} }

Loading…
Cancel
Save