Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
windows: Don't throw an error when the settings file is empty (#39908)
Cole Millera4ec693e3471
diff --git a/crates/migrator/src/migrator.rs b/crates/migrator/src/migrator.rsindex a493b1efbe0..dbf7605e1db 100644--- a/crates/migrator/src/migrator.rs+++ b/crates/migrator/src/migrator.rs@@ -78,6 +78,9 @@ fn run_migrations(text: &str, migrations: &[MigrationType]) -> Result<Option<Strlet migrated_text = match migration {MigrationType::TreeSitter(patterns, query) => migrate(¤t_text, patterns, query)?,MigrationType::Json(callback) => {+ if current_text.trim().is_empty() {+ return Ok(None);+ }let old_content: serde_json_lenient::Value =settings::parse_json_with_comments(¤t_text)?;let old_value = serde_json::to_value(&old_content).unwrap();