fix(custom client): msi update, preserve exe name (#16057)

Keep the configured app name casing when renaming
the updated executable so legacy MSI custom actions
can terminate custom client processes.

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2026-09-04 15:49:50 +08:00
committed by GitHub
parent b6ff62c74b
commit d5c6d0f6b7

View File

@@ -1496,8 +1496,8 @@ pub fn rename_exe_cmd(src_exe: &str, path: &str) -> ResultType<String> {
.ok_or(anyhow!("Can't get file name of {src_exe}"))?
.to_string_lossy()
.to_string();
let app_name = crate::get_app_name().to_lowercase();
if src_exe_filename.to_lowercase() == format!("{app_name}.exe") {
let app_name = crate::get_app_name();
if src_exe_filename == format!("{app_name}.exe") {
Ok("".to_owned())
} else {
Ok(format!(