diff --git a/src/platform/windows.rs b/src/platform/windows.rs index 55f732691..df783b781 100644 --- a/src/platform/windows.rs +++ b/src/platform/windows.rs @@ -2178,7 +2178,7 @@ pub fn install_service() -> bool { log::info!("Installing service..."); let (_, _, _, exe) = get_install_info(); let tmp_path = std::env::temp_dir().to_string_lossy().to_string(); - let tray_shortcut = get_tray_shortcut(&exe, &tmp_path)?; + let tray_shortcut = get_tray_shortcut(&exe, &tmp_path).unwrap_or_default(); let filter = format!(" /FI \"PID ne {}\"", get_current_pid()); Config::set_option("stop-service".into(), "".into()); crate::ipc::EXIT_RECV_CLOSE.store(false, Ordering::Relaxed); @@ -2270,7 +2270,7 @@ fn run_after_run_cmds(silent: bool) { if Config::get_option("stop-service") != "Y" { allow_err!(std::process::Command::new(&exe).arg("--tray").spawn()); } - std::thread::sleep(std::time::Duration::from_millis(300)); + std::thread::sleep(std::time::Duration::from_millis(300)); } #[cfg(test)]