workspace: Do not panic when the database is corruped (#42186)

Fixes ZED-1NK

Release Notes:

- Fixed zed not starting when the database cannot be loaded
This commit is contained in:
Lukas Wirth
2025-11-07 12:36:36 +00:00
committed by GitHub
parent 9d52b6c538
commit 39fb89e031
+1 -2
View File
@@ -791,12 +791,11 @@ impl WorkspaceDb {
remote_connection_id IS ?
LIMIT 1
})
.map(|mut prepared_statement| {
.and_then(|mut prepared_statement| {
(prepared_statement)((
root_paths.serialize().paths,
remote_connection_id.map(|id| id.0 as i32),
))
.unwrap()
})
.context("No workspaces found")
.warn_on_err()