mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 09:44:46 +03:00
Restore temp file initialization in telemetry code
This commit is contained in:
parent
78858d4d11
commit
1d7dc96135
@ -14,6 +14,7 @@ use sysinfo::{
|
||||
};
|
||||
use tempfile::NamedTempFile;
|
||||
use util::http::HttpClient;
|
||||
use util::ResultExt;
|
||||
use util::{channel::ReleaseChannel, TryFutureExt};
|
||||
|
||||
use self::event_coalescer::EventCoalescer;
|
||||
@ -167,6 +168,19 @@ impl Telemetry {
|
||||
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>({
|
||||
let state = state.clone();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user