use per-user runtime stats path for reliable gsfd+tui updates
Tests / test_core_function (push) Failing after 11s
Tests / test_core_function (push) Failing after 11s
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user