mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-03 17:51:28 +03:00
change quick support filename detection (#14050)
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user