diff options
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")] |