diff --git a/src/core_main.rs b/src/core_main.rs index f8741a72f..40c387722 100644 --- a/src/core_main.rs +++ b/src/core_main.rs @@ -43,9 +43,9 @@ pub fn core_main() -> Option> { } #[cfg(any(target_os = "linux", target_os = "windows"))] if args.is_empty() { - #[cfg(target_os = "linux")] - hbb_common::allow_err!(crate::platform::check_autostart_config()); if crate::check_process("--server", false) && !crate::check_process("--tray", true) { + #[cfg(target_os = "linux")] + hbb_common::allow_err!(crate::platform::check_autostart_config()); hbb_common::allow_err!(crate::run_me(vec!["--tray"])); } }