Verify removing worktrees while host is offline

This commit is contained in:
Antonio Scandurra 2022-12-21 11:47:01 +01:00
parent 59d7f06c57
commit ecd80c553c
2 changed files with 59 additions and 27 deletions

View file

@ -4645,6 +4645,7 @@ impl Project {
.remove(&old_peer_id)
.ok_or_else(|| anyhow!("received UpdateProjectCollaborator for unknown peer"))?;
this.collaborators.insert(new_peer_id, collaborator);
if let Some(buffers) = this.shared_buffers.remove(&old_peer_id) {
this.shared_buffers.insert(new_peer_id, buffers);
}