This commit is contained in:
rustdesk 2023-06-07 23:33:05 +08:00
parent 33c2d04297
commit e4d1f96ad6

View File

@ -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)]