Include crash reports and attempt to order by age. (#1178)

* Include crash reports and attempt to order by age.

* Do all sorting within rust.

* Remove excess debug.

* Remove new once_cell dep.

* Use EPOCH as fallback instead of now()

* Fix prettier lint warnings.
This commit is contained in:
Corey Shupe
2024-05-09 13:29:19 -04:00
committed by GitHub
parent 53007465cd
commit a4f133eb46
7 changed files with 173 additions and 90 deletions

View File

@@ -165,6 +165,14 @@ impl DirectoryInfo {
) -> crate::Result<PathBuf> {
Ok(profile_id.get_full_path().await?.join("logs"))
}
/// Gets the crash reports dir for a given profile
#[inline]
pub async fn crash_reports_dir(
profile_id: &ProfilePathId,
) -> crate::Result<PathBuf> {
Ok(profile_id.get_full_path().await?.join("crash-reports"))
}
#[inline]
pub fn launcher_logs_dir() -> Option<PathBuf> {