use per-user runtime stats path for reliable gsfd+tui updates
Tests / test_core_function (push) Failing after 11s

This commit is contained in:
2026-03-25 16:01:10 +00:00
parent 3e8d068494
commit 8521f12548
4 changed files with 14 additions and 3 deletions
+6 -1
View File
@@ -44,6 +44,11 @@ fn stats_path() -> PathBuf {
return PathBuf::from(path);
}
// Keep default shared across sudo/non-sudo runs.
if let Ok(runtime_dir) = std::env::var("XDG_RUNTIME_DIR")
&& !runtime_dir.is_empty()
{
return PathBuf::from(runtime_dir).join("gsf-speed.txt");
}
PathBuf::from("/tmp/gsf-speed.txt")
}