diff --git a/crates/workspace/src/path_list.rs b/crates/workspace/src/path_list.rs index b2ed0ed5bc..cf463e6b22 100644 --- a/crates/workspace/src/path_list.rs +++ b/crates/workspace/src/path_list.rs @@ -58,7 +58,7 @@ impl PathList { let mut paths: Vec = if serialized.paths.is_empty() { Vec::new() } else { - serialized.paths.split('\0').map(PathBuf::from).collect() + serialized.paths.split('\n').map(PathBuf::from).collect() }; let mut order: Vec = serialized @@ -84,7 +84,7 @@ impl PathList { let mut paths = String::new(); for path in self.paths.iter() { if !paths.is_empty() { - paths.push('\0'); + paths.push('\n'); } paths.push_str(&path.to_string_lossy()); } diff --git a/crates/workspace/src/persistence.rs b/crates/workspace/src/persistence.rs index a7e3d7014e..89e1147d8a 100644 --- a/crates/workspace/src/persistence.rs +++ b/crates/workspace/src/persistence.rs @@ -553,7 +553,7 @@ impl Domain for WorkspaceDb { WHEN workspaces.local_paths_array IS NULL OR workspaces.local_paths_array = "" THEN NULL ELSE - replace(workspaces.local_paths_array, ',', '\0') + replace(workspaces.local_paths_array, ',', "\n") END END as paths, @@ -613,11 +613,12 @@ impl Domain for WorkspaceDb { replace( substr(paths, 3, length(paths) - 4), '"' || ',' || '"', - '\0' + CHAR(10) ) ELSE - replace(paths, ',', '\0') + replace(paths, ',', CHAR(10)) END + WHERE paths IS NOT NULL ), ];