From 91149f9dfcb59ee264b009fc97ad834f21c337cb Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Tue, 21 Feb 2023 21:06:28 -0500 Subject: [PATCH] Fix incorrect home dir on Decky --- usdpl-back/Cargo.toml | 2 +- usdpl-back/src/api_common/dirs.rs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/usdpl-back/Cargo.toml b/usdpl-back/Cargo.toml index 412f442..69807b4 100644 --- a/usdpl-back/Cargo.toml +++ b/usdpl-back/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "usdpl-back" -version = "0.10.0" +version = "0.10.1" edition = "2021" license = "GPL-3.0-only" repository = "https://github.com/NGnius/usdpl-rs" diff --git a/usdpl-back/src/api_common/dirs.rs b/usdpl-back/src/api_common/dirs.rs index c1f321f..b07f347 100644 --- a/usdpl-back/src/api_common/dirs.rs +++ b/usdpl-back/src/api_common/dirs.rs @@ -9,7 +9,12 @@ pub fn home() -> Option { #[cfg(all(feature = "crankshaft", not(any(feature = "decky"))))] let result = None; // TODO #[cfg(all(feature = "decky", not(any(feature = "crankshaft"))))] - let result = crate::api_decky::home().ok().map(|x| x.into()); + let result = crate::api_decky::home().ok() + .map(|x| PathBuf::from(x) + .join("..") + .canonicalize() + .ok() + ).flatten(); result }