Fix incorrect home dir on Decky

This commit is contained in:
NGnius (Graham) 2023-02-21 21:06:28 -05:00
parent c06a047a88
commit 91149f9dfc
2 changed files with 7 additions and 2 deletions

View file

@ -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"

View file

@ -9,7 +9,12 @@ pub fn home() -> Option<PathBuf> {
#[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
}