Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Show error alert when there's an error opening file with native OS picker (#22671)
spotikhanov410b4bded1cf
diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rsindex f9104525a01..1ee5d8e6bd3 100644--- a/crates/workspace/src/workspace.rs+++ b/crates/workspace/src/workspace.rs@@ -5553,15 +5553,22 @@ pub fn open_paths(}if let Some(existing) = existing {- Ok((- existing,- existing- .update(&mut cx, |workspace, cx| {- cx.activate_window();- workspace.open_paths(abs_paths, open_visible, None, cx)- })?- .await,- ))+ let open_task = existing+ .update(&mut cx, |workspace, cx| {+ cx.activate_window();+ workspace.open_paths(abs_paths, open_visible, None, cx)+ })?+ .await;++ _ = existing.update(&mut cx, |workspace, cx| {+ for item in open_task.iter().flatten() {+ if let Err(e) = item {+ workspace.show_error(&e, cx);+ }+ }+ });++ Ok((existing, open_task))} else {cx.update(move |cx| {Workspace::new_local(