From 74e17c2f64167f33b3caf7181c5a6c9efb7e4706 Mon Sep 17 00:00:00 2001 From: Julia Ryan Date: Tue, 5 Aug 2025 20:11:16 -0500 Subject: [PATCH] Fix panic-json writing (#35691) We broke it in #35263 when we changed the open options to use `create_new` Release Notes: - N/A --- crates/zed/src/reliability.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/zed/src/reliability.rs b/crates/zed/src/reliability.rs index ed149a470acb805ca564356faa233d70e8e62320..df50ecc74385c164dc238a1191081a3f71ddece0 100644 --- a/crates/zed/src/reliability.rs +++ b/crates/zed/src/reliability.rs @@ -149,6 +149,7 @@ pub fn init_panic_hook( let timestamp = chrono::Utc::now().format("%Y_%m_%d %H_%M_%S").to_string(); let panic_file_path = paths::logs_dir().join(format!("zed-{timestamp}.panic")); let panic_file = fs::OpenOptions::new() + .write(true) .create_new(true) .open(&panic_file_path) .log_err();