An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Rust androidanydeskdartflatpakflutterflutter-appsioslinuxmacosp2prdpremote-controlremote-desktoprustrust-langteamviewervncwaylandwindows
change quick support filename detection (#14050)
21pagesc4a9835ae539
diff --git a/libs/portable/src/main.rs b/libs/portable/src/main.rsindex 85b19e9e9..1c754cc74 100644--- a/libs/portable/src/main.rs+++ b/libs/portable/src/main.rs@@ -187,7 +187,7 @@ fn main() {i += 1;}let click_setup = args.is_empty() && arg_exe.to_lowercase().ends_with("install.exe");- let quick_support = args.is_empty() && arg_exe.to_lowercase().ends_with("qs.exe");+ let quick_support = args.is_empty() && win::is_quick_support_exe(&arg_exe);let mut ui = false;let reader = BinaryReader::default();@@ -234,4 +234,12 @@ mod win {.output();let _allow_err = std::fs::copy(src, &format!("{}\\{}", dir.to_string_lossy(), tgt));}++ /// Check if the executable is a Quick Support version.+ /// Note: This function must be kept in sync with `src/core_main.rs`.+ #[inline]+ pub(super) fn is_quick_support_exe(exe: &str) -> bool {+ let exe = exe.to_lowercase();+ exe.contains("-qs-") || exe.contains("-qs.exe") || exe.contains("_qs.exe")+ }}diff --git a/src/core_main.rs b/src/core_main.rsindex ad8154dc6..7962a693e 100644--- a/src/core_main.rs+++ b/src/core_main.rs@@ -140,7 +140,7 @@ pub fn core_main() -> Option<Vec<String>> {{_is_quick_support |= !crate::platform::is_installed()&& args.is_empty()- && (arg_exe.to_lowercase().contains("-qs-")+ && (is_quick_support_exe(&arg_exe)|| config::LocalConfig::get_option("pre-elevate-service") == "Y"|| (!click_setup && crate::platform::is_elevated(None).unwrap_or(false)));crate::portable_service::client::set_quick_support(_is_quick_support);@@ -829,3 +829,12 @@ fn is_root() -> bool {#[allow(unreachable_code)]crate::platform::is_root()}++/// Check if the executable is a Quick Support version.+/// Note: This function must be kept in sync with `libs/portable/src/main.rs`.+#[cfg(windows)]+#[inline]+fn is_quick_support_exe(exe: &str) -> bool {+ let exe = exe.to_lowercase();+ exe.contains("-qs-") || exe.contains("-qs.exe") || exe.contains("_qs.exe")+}