Don't write temp files for telemetry logs (#20209)

This still keeps a telemetry.log for the current session, but not one
file per load of zed.

Closes: #20045

Release Notes:

- Fixed a bug where Zed would create a new temporary file on each boot
for telemetry logs
This commit is contained in:
Conrad Irwin 2024-11-05 14:05:51 -07:00 committed by GitHub
parent 765626a007
commit 66e06616db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 15 deletions

View file

@ -999,7 +999,7 @@ fn open_telemetry_log_file(workspace: &mut Workspace, cx: &mut ViewContext<Works
let app_state = workspace.app_state().clone();
cx.spawn(|workspace, mut cx| async move {
async fn fetch_log_string(app_state: &Arc<AppState>) -> Option<String> {
let path = app_state.client.telemetry().log_file_path()?;
let path = client::telemetry::Telemetry::log_file_path();
app_state.fs.load(&path).await.log_err()
}