diff --git a/crates/workspace/src/persistence.rs b/crates/workspace/src/persistence.rs index d38602ea768e8e..8f734201f444da 100644 --- a/crates/workspace/src/persistence.rs +++ b/crates/workspace/src/persistence.rs @@ -1865,11 +1865,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 - && Self::all_paths_exist_with_a_directory(paths.paths(), fs, Some(timestamp)).await - { + if has_wsl_path { + delete_tasks.push(self.delete_workspace_by_id(id)); + } else if Self::all_paths_exist_with_a_directory(paths.paths(), fs, None).await { result.push((id, SerializedWorkspaceLocation::Local, paths, timestamp)); - } else { + } else if Utc::now() - timestamp >= chrono::Duration::days(7) { delete_tasks.push(self.delete_workspace_by_id(id)); } }