From 3cd2be5081e1cd2d81e6a92558a3bb64a9bbd9cd Mon Sep 17 00:00:00 2001 From: GyDi Date: Mon, 21 Nov 2022 23:11:56 +0800 Subject: [PATCH] fix: check config --- src-tauri/src/core/core.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/core/core.rs b/src-tauri/src/core/core.rs index 8055fd5..4829c6c 100644 --- a/src-tauri/src/core/core.rs +++ b/src-tauri/src/core/core.rs @@ -59,8 +59,11 @@ impl CoreManager { let clash_core = { Config::verge().latest().clash_core.clone() }; let clash_core = clash_core.unwrap_or("clash".into()); + let app_dir = dirs::app_home_dir()?; + let app_dir = dirs::path_to_str(&app_dir)?; + let output = Command::new_sidecar(clash_core)? - .args(["-t", "-f", config_path]) + .args(["-t", "-d", app_dir, "-f", config_path]) .output()?; if !output.status.success() {