From 01b5f317400ae8fc2eddd42c1a10ddf8bbe122ad Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Tue, 21 Jul 2026 14:39:51 +0800 Subject: [PATCH] fix(agent): simplify offline archive entry types --- crates/dbx-core/src/agent_service.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/dbx-core/src/agent_service.rs b/crates/dbx-core/src/agent_service.rs index 07ecd547b5..b699856fd2 100644 --- a/crates/dbx-core/src/agent_service.rs +++ b/crates/dbx-core/src/agent_service.rs @@ -1250,7 +1250,9 @@ pub struct OfflineImportPlan { pub includes_jre: bool, } +type OfflineJreEntry = (String, String); type OfflineDriverEntry = (String, String, bool); +type OfflineArchiveEntries = (Vec, Vec); pub fn inspect_offline_zip(zip_path: &Path) -> Result { let file = std::fs::File::open(zip_path).map_err(|e| format!("Failed to open ZIP file: {e}"))?; @@ -1401,7 +1403,7 @@ pub fn import_offline_zip( fn collect_offline_entries( archive: &mut zip::ZipArchive, registry: &AgentRegistry, -) -> Result<(Vec<(String, String)>, Vec), String> { +) -> Result { let platform = AgentManager::current_platform(); let mut jre_entries = Vec::new(); let mut drivers = std::collections::BTreeMap::::new();