diff --git a/anime-launcher-sdk b/anime-launcher-sdk index c977382..e1ec9f7 160000 --- a/anime-launcher-sdk +++ b/anime-launcher-sdk @@ -1 +1 @@ -Subproject commit c977382d270f1414c1691077120516ff27f01ee4 +Subproject commit e1ec9f7796763de558ca49c9c15dae864db9fcda diff --git a/src/ui/first_run/default_paths.rs b/src/ui/first_run/default_paths.rs index 329d843..3c5d7a6 100644 --- a/src/ui/first_run/default_paths.rs +++ b/src/ui/first_run/default_paths.rs @@ -239,7 +239,7 @@ impl SimpleAsyncComponent for DefaultPathsApp { patch: CONFIG.patch.path.clone(), #[allow(clippy::or_fun_call)] - temp: CONFIG.launcher.temp.clone().unwrap_or(PathBuf::from("/tmp")) + temp: CONFIG.launcher.temp.clone().unwrap_or(std::env::temp_dir()) }; let widgets = view_output!(); diff --git a/src/ui/main/mod.rs b/src/ui/main/mod.rs index 4052468..b336615 100644 --- a/src/ui/main/mod.rs +++ b/src/ui/main/mod.rs @@ -322,7 +322,7 @@ impl SimpleComponent for App { set_sensitive: match model.state.as_ref() { Some(LauncherState::PredownloadAvailable { game, voices }) => { let config = config::get().unwrap(); - let temp = config.launcher.temp.unwrap_or_else(|| PathBuf::from("/tmp")); + let temp = config.launcher.temp.unwrap_or_else(std::env::temp_dir); let downloaded = temp.join(game.file_name().unwrap()).exists() && voices.iter().all(|voice| temp.join(voice.file_name().unwrap()).exists()); @@ -337,7 +337,7 @@ impl SimpleComponent for App { set_css_classes: match model.state.as_ref() { Some(LauncherState::PredownloadAvailable { game, voices }) => { let config = config::get().unwrap(); - let temp = config.launcher.temp.unwrap_or_else(|| PathBuf::from("/tmp")); + let temp = config.launcher.temp.unwrap_or_else(std::env::temp_dir); let downloaded = temp.join(game.file_name().unwrap()).exists() && voices.iter().all(|voice| temp.join(voice.file_name().unwrap()).exists()); @@ -893,7 +893,7 @@ impl SimpleComponent for App { #[allow(unused_must_use)] AppMsg::PredownloadUpdate => { if let Some(LauncherState::PredownloadAvailable { game, mut voices }) = self.state.clone() { - let tmp = config::get().unwrap().launcher.temp.unwrap_or_else(|| PathBuf::from("/tmp")); + let tmp = config::get().unwrap().launcher.temp.unwrap_or_else(std::env::temp_dir); self.downloading = true;