handle .exe.exe, since ext hidden, clients likely append exetra .exe

This commit is contained in:
rustdesk 2023-08-16 11:02:07 +08:00
parent 1bcac047aa
commit 309cb1010c

View File

@ -31,7 +31,9 @@ fn get_license_from_string_(s: &str) -> ResultType<License> {
}
pub fn get_license_from_string(s: &str) -> ResultType<License> {
let s = if s.to_lowercase().ends_with(".exe") {
let s = if s.to_lowercase().ends_with(".exe.exe") {
&s[0..s.len() - 8]
} else if s.to_lowercase().ends_with(".exe") {
&s[0..s.len() - 4]
} else {
s