handle .exe.exe, since ext hidden, clients likely append exetra .exe
This commit is contained in:
parent
1bcac047aa
commit
309cb1010c
@ -31,7 +31,9 @@ fn get_license_from_string_(s: &str) -> ResultType<License> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub 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]
|
&s[0..s.len() - 4]
|
||||||
} else {
|
} else {
|
||||||
s
|
s
|
||||||
|
Loading…
x
Reference in New Issue
Block a user