From 6681da7795f414122ee9d7fe0819ca05819b7f80 Mon Sep 17 00:00:00 2001 From: zqm Date: Thu, 9 Apr 2026 15:34:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=B7=E6=B1=82=E8=B7=AF=E5=BE=84=EF=BC=9AEa?= =?UTF-8?q?syTest\EasyTest.exe=20=E2=80=A2=20=E6=9C=8D=E5=8A=A1=E7=AB=AF?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=B8=BA=E7=A9=BA=E6=97=B6=E8=B7=B3=E8=BF=87?= =?UTF-8?q?=E8=AF=A5=E5=BA=94=E7=94=A8=20=E2=80=A2=20=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=20D:/AppData/Updater/UpGrade/{app=5Fname}/?= =?UTF-8?q?=20=E4=BC=9A=E8=87=AA=E5=8A=A8=E5=88=9B=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Windows/CS/Framework4.0/Updater/src/main.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Windows/CS/Framework4.0/Updater/src/main.rs b/Windows/CS/Framework4.0/Updater/src/main.rs index c0e1eaf..7bafaf5 100644 --- a/Windows/CS/Framework4.0/Updater/src/main.rs +++ b/Windows/CS/Framework4.0/Updater/src/main.rs @@ -1417,7 +1417,7 @@ async fn run_updater(debug_mode: bool) -> bool { // 构建应用版本查询 let mut file_list = Vec::new(); for app in &candidates { - file_list.push(format!("{}.exe", app)); + file_list.push(format!("{}\\{}.exe", app, app)); } let file_list_json = serde_json::to_string(&file_list).unwrap_or_else(|_| "[]".to_string()); let msg_str = format!( @@ -1444,7 +1444,7 @@ async fn run_updater(debug_mode: bool) -> bool { let mut file_list = Vec::new(); for app in &candidates { - file_list.push(format!("{}.exe", app)); + file_list.push(format!("{}\\{}.exe", app, app)); } let file_list_json = serde_json::to_string(&file_list).unwrap_or_else(|_| "[]".to_string()); let msg_str = format!( @@ -1463,9 +1463,14 @@ async fn run_updater(debug_mode: bool) -> bool { let mut apps_to_update = Vec::new(); for app_name in &candidates { - let exe_name = format!("{}.exe", app_name); + let exe_name = format!("{}\\{}.exe", app_name, app_name); if let Some(server_ver) = file_versions.get(&exe_name) { - let server_version = server_ver.as_str().unwrap_or("0.0.0"); + let server_version = server_ver.as_str().unwrap_or(""); + // 服务端版本为空,说明没有该应用,跳过 + if server_version.is_empty() { + log_print!("{} [应用] {} 服务端版本为空,跳过升级", ts, app_name); + continue; + } let local_version = get_local_app_version(app_name, &exe_name); log_print!("{} [应用] {}: 服务端={}, 本地={}", ts, app_name, server_version, local_version);