diff --git a/src-tauri/src/core/service.rs b/src-tauri/src/core/service.rs index 7b62a325129c6814f69b1351127f493d0c02b5bf..679c03d148acfac9e1281e2966eed55b3f1e08d6 100644 --- a/src-tauri/src/core/service.rs +++ b/src-tauri/src/core/service.rs @@ -129,8 +129,15 @@ impl Service { let app_dir = dirs::app_home_dir(); let app_dir = app_dir.as_os_str().to_str().unwrap(); + // fix #212 + let args = match clash_core.as_str() { + "clash-meta" => vec!["-m", "-d", app_dir], + _ => vec!["-d", app_dir], + }; + let cmd = Command::new_sidecar(clash_core)?; - let (mut rx, cmd_child) = cmd.args(["-d", app_dir]).spawn()?; + + let (mut rx, cmd_child) = cmd.args(args).spawn()?; // å°†pidå†™å…¥æ–‡ä»¶ä¸ let pid = cmd_child.pid();