new naming to support plain config

This commit is contained in:
rustdesk
2022-05-14 17:00:21 +08:00
parent 8fd2e1a0ed
commit 750a800c08
2 changed files with 41 additions and 9 deletions

View File

@@ -1204,14 +1204,7 @@ fn get_reg_of(subkey: &str, name: &str) -> String {
fn get_license_from_exe_name() -> ResultType<License> {
let exe = std::env::current_exe()?.to_str().unwrap_or("").to_owned();
let tmp: Vec<&str> = exe.split("-licensed-").collect();
if let Some(tmp) = tmp.last() {
let tmp: Vec<&str> = tmp.split(".").collect();
if let Some(tmp) = tmp.first() {
return get_license_from_string(tmp);
}
}
Ok(Default::default())
get_license_from_string(exe)
}
#[inline]