From 4cef8eb47bb157916f10cedd18b0c1a85cd21977 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Fri, 5 Dec 2025 16:55:05 -0700 Subject: [PATCH] Fix persistence for single-file worktrees (#44257) We were just deleting them before Co-Authored-By: Matthew Chisolm Closes #ISSUE Release Notes: - Fixed restoring window location for single-file worktrees Co-authored-by: Matthew Chisolm --- crates/workspace/src/persistence.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/workspace/src/persistence.rs b/crates/workspace/src/persistence.rs index 824a9be90b6dc33094f854a3a9672db692e2b592..103e51d548648c18b5b2d724362228948a70930b 100644 --- a/crates/workspace/src/persistence.rs +++ b/crates/workspace/src/persistence.rs @@ -1359,11 +1359,11 @@ impl WorkspaceDb { // If a local workspace points to WSL, this check will cause us to wait for the // WSL VM and file server to boot up. This can block for many seconds. // Supported scenarios use remote workspaces. - if !has_wsl_path - && paths.paths().iter().all(|path| path.exists()) - && paths.paths().iter().any(|path| path.is_dir()) - { - result.push((id, SerializedWorkspaceLocation::Local, paths)); + if !has_wsl_path && paths.paths().iter().all(|path| path.exists()) { + // Only show directories in recent projects + if paths.paths().iter().any(|path| path.is_dir()) { + result.push((id, SerializedWorkspaceLocation::Local, paths)); + } } else { delete_tasks.push(self.delete_workspace_by_id(id)); }