Do not allow drag and drop of FS entries into the remote projects (#19565)

Release Notes:

- N/A
This commit is contained in:
Kirill Bulatov 2024-10-22 22:34:54 +03:00 committed by GitHub
parent 23ad470daf
commit 7a6550c1d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 87 additions and 71 deletions

View file

@ -356,8 +356,10 @@ impl AssistantPanel {
let project = workspace.project().clone();
pane.set_custom_drop_handle(cx, move |_, dropped_item, cx| {
let action = maybe!({
if let Some(paths) = dropped_item.downcast_ref::<ExternalPaths>() {
return Some(InsertDraggedFiles::ExternalFiles(paths.paths().to_vec()));
if project.read(cx).is_local() {
if let Some(paths) = dropped_item.downcast_ref::<ExternalPaths>() {
return Some(InsertDraggedFiles::ExternalFiles(paths.paths().to_vec()));
}
}
let project_paths = if let Some(tab) = dropped_item.downcast_ref::<DraggedTab>()