Fix persistence for single-file worktrees (#44257)

We were just deleting them before

Co-Authored-By: Matthew Chisolm <mchisolm0@gmail.com>

Closes #ISSUE

Release Notes:

- Fixed restoring window location for single-file worktrees

Co-authored-by: Matthew Chisolm <mchisolm0@gmail.com>
This commit is contained in:
Conrad Irwin
2025-12-05 23:55:05 +00:00
committed by GitHub
co-authored by Matthew Chisolm
parent e5f87735d3
commit 4cef8eb47b
+5 -5
View File
@@ -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));
}