fix(core): resolve the bundled core for validation fingerprints

This commit is contained in:
Tunglies
2026-12-02 02:02:07 +08:00
parent b99c42a2f5
commit 882ddb6194
+5 -3
View File
@@ -7,6 +7,7 @@ use std::{
sync::LazyLock,
sync::atomic::{AtomicBool, Ordering},
};
use tauri::Manager as _;
use tauri_plugin_shell::ShellExt as _;
use tokio::fs;
use tristr::alias::String;
@@ -26,9 +27,10 @@ async fn validation_fingerprint(yaml: &str) -> u64 {
let mut hasher = DefaultHasher::new();
yaml.hash(&mut hasher);
core.as_str().hash(&mut hasher);
let binary = std::env::current_exe()
.into_iter()
.map(|exe| exe.with_file_name(format!("{}{}", core.as_str(), std::env::consts::EXE_SUFFIX)));
let binary = handle::Handle::app_handle()
.path()
.resolve_external_bin(core.as_str())
.into_iter();
// The test run reads geo databases from the app dir; a geo update must revalidate.
let geo = dirs::app_home_dir().into_iter().flat_map(|dir| {
super::runtime_bundle::GEO_ASSETS