Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix empty path being shown as an item in the recent projects picker (#53400)
Danilo Lealde81d610992e
diff --git a/crates/workspace/src/multi_workspace.rs b/crates/workspace/src/multi_workspace.rsindex aad5207e8b8..fa4f29ecad1 100644--- a/crates/workspace/src/multi_workspace.rs+++ b/crates/workspace/src/multi_workspace.rs@@ -586,6 +586,9 @@ impl MultiWorkspace {pub fn restore_project_group_keys(&mut self, keys: Vec<ProjectGroupKey>) {let mut restored: Vec<ProjectGroupKey> = Vec::with_capacity(keys.len());for key in keys {+ if key.path_list().paths().is_empty() {+ continue;+ }if !restored.contains(&key) {restored.push(key);}diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rsindex 3d1f67bf69f..e6244f63b8b 100644--- a/crates/workspace/src/workspace.rs+++ b/crates/workspace/src/workspace.rs@@ -8778,6 +8778,9 @@ pub async fn restore_multiworkspace(// stale keys from previous sessions get normalized and deduped.let mut resolved_keys: Vec<ProjectGroupKey> = Vec::new();for key in project_group_keys.into_iter().map(ProjectGroupKey::from) {+ if key.path_list().paths().is_empty() {+ continue;+ }let mut resolved_paths = Vec::new();for path in key.path_list().paths() {if let Some(common_dir) =