Prevent dumping of temporary files in config_dir (#14002)

Move telemetry temp files from `config_dir` to `log_dir`. Fixes #7155 

- On MacOS: from `~/.config/zed` to `~/Library/Logs/Zed`
- On Linux: from `~/.config/zed` to `.local/share/zed/logs` (or
`$FLATPAK_XDG_DATA_HOME/zed/logs`).

Release Notes:

- Fixed telemetry putting temporary files in config_dir
([#7155](https://github.com/zed-industries/zed/issues/7155)).
This commit is contained in:
Peter Tripp 2024-07-09 16:59:17 +00:00 committed by GitHub
parent 2a97aad273
commit 6cc8412a05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -227,7 +227,7 @@ impl Telemetry {
let state = state.clone(); let state = state.clone();
async move { async move {
if let Some(tempfile) = if let Some(tempfile) =
NamedTempFile::new_in(paths::config_dir().as_path()).log_err() NamedTempFile::new_in(paths::logs_dir().as_path()).log_err()
{ {
state.lock().log_file = Some(tempfile); state.lock().log_file = Some(tempfile);
} }