mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-09 12:01:58 +00:00
Restore temp file initialization in telemetry code
This commit is contained in:
parent
78858d4d11
commit
1d7dc96135
1 changed files with 14 additions and 0 deletions
|
@ -14,6 +14,7 @@ use sysinfo::{
|
||||||
};
|
};
|
||||||
use tempfile::NamedTempFile;
|
use tempfile::NamedTempFile;
|
||||||
use util::http::HttpClient;
|
use util::http::HttpClient;
|
||||||
|
use util::ResultExt;
|
||||||
use util::{channel::ReleaseChannel, TryFutureExt};
|
use util::{channel::ReleaseChannel, TryFutureExt};
|
||||||
|
|
||||||
use self::event_coalescer::EventCoalescer;
|
use self::event_coalescer::EventCoalescer;
|
||||||
|
@ -167,6 +168,19 @@ impl Telemetry {
|
||||||
event_coalescer: EventCoalescer::new(),
|
event_coalescer: EventCoalescer::new(),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
cx.background_executor()
|
||||||
|
.spawn({
|
||||||
|
let state = state.clone();
|
||||||
|
async move {
|
||||||
|
if let Some(tempfile) =
|
||||||
|
NamedTempFile::new_in(util::paths::CONFIG_DIR.as_path()).log_err()
|
||||||
|
{
|
||||||
|
state.lock().log_file = Some(tempfile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.detach();
|
||||||
|
|
||||||
cx.observe_global::<SettingsStore>({
|
cx.observe_global::<SettingsStore>({
|
||||||
let state = state.clone();
|
let state = state.clone();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue