Don't allow dropping files on remote projects (#11218)
Release Notes: - Fixed a panic when a remote participant dropped a local file on your project
This commit is contained in:
parent
f11a7811f3
commit
cb7350174e
2 changed files with 25 additions and 5 deletions
|
@ -8525,11 +8525,13 @@ impl Project {
|
|||
OpenBuffer::Weak(_) => {}
|
||||
},
|
||||
hash_map::Entry::Vacant(e) => {
|
||||
assert!(
|
||||
is_remote,
|
||||
"received buffer update from {:?}",
|
||||
envelope.original_sender_id
|
||||
);
|
||||
if !is_remote {
|
||||
debug_panic!(
|
||||
"received buffer update from {:?}",
|
||||
envelope.original_sender_id
|
||||
);
|
||||
return Err(anyhow!("received buffer update for non-remote project"));
|
||||
}
|
||||
e.insert(OpenBuffer::Operations(ops));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue