diff --git a/crates/workspace/src/persistence.rs b/crates/workspace/src/persistence.rs
index cd425c3a28..03a866f2f6 100644
--- a/crates/workspace/src/persistence.rs
+++ b/crates/workspace/src/persistence.rs
@@ -216,7 +216,9 @@ impl WorkspaceDb {
let mut result = Vec::new();
let mut delete_tasks = Vec::new();
for (id, location) in self.recent_workspaces()? {
- if location.paths().iter().all(|path| path.exists()) {
+ if location.paths().iter().all(|path| path.exists())
+ && location.paths().iter().any(|path| path.is_dir())
+ {
result.push((id, location));
} else {
delete_tasks.push(self.delete_stale_workspace(id));
@@ -227,14 +229,13 @@ impl WorkspaceDb {
Ok(result)
}
- query! {
- pub fn last_workspace() -> Result