diff options
author | RaindropsSys <raindrops@equestria.dev> | 2024-05-10 19:45:35 +0200 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2024-05-10 19:45:35 +0200 |
commit | c527e9d533135da7087b3069ac2b4d42f4daf994 (patch) | |
tree | 66c3b32784d1c87c12e1556fc26e98dbdc403209 /launcher/src/main.rs | |
parent | 0d2c955098f7a16e1b844196fb6f996c5e09d9c8 (diff) | |
download | atomic-c527e9d533135da7087b3069ac2b4d42f4daf994.tar.gz atomic-c527e9d533135da7087b3069ac2b4d42f4daf994.tar.bz2 atomic-c527e9d533135da7087b3069ac2b4d42f4daf994.zip |
Crappy code fix 2/?
Diffstat (limited to 'launcher/src/main.rs')
-rw-r--r-- | launcher/src/main.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/launcher/src/main.rs b/launcher/src/main.rs index 28813f6..959b517 100644 --- a/launcher/src/main.rs +++ b/launcher/src/main.rs @@ -11,23 +11,23 @@ fn get_home() -> PathBuf { #[cfg(target_os = "macos")] fn get_home_search() -> PathBuf { - PathBuf::from(format!("{}/Library/Frameworks/AtomicRuntime.framework", get_home() - .to_str() - .unwrap_or("/"))) + let mut path = get_home(); + path.push("/Library/Frameworks/AtomicRuntime.framework"); + path } #[cfg(target_os = "linux")] fn get_home_search() -> PathBuf { - PathBuf::from(format!("{}/.local/share/atomic-runtime", get_home() - .to_str() - .unwrap_or("/"))) + let mut path = get_home(); + path.push("/.local/share/atomic-runtime"); + path } #[cfg(target_os = "windows")] fn get_home_search() -> PathBuf { - PathBuf::from(format!("{}\\AppData\\Local\\Atomic Runtime", get_home() - .to_str() - .unwrap_or("/"))) + let mut path = get_home(); + path.push("\\AppData\\Local\\Atomic Runtime"); + path } #[cfg(target_os = "macos")] |