chore: remove compatibility code

This commit is contained in:
huzibaca 2024-09-26 19:47:00 +08:00
parent 5b822d238d
commit e8ed7c1e3e
No known key found for this signature in database
GPG Key ID: D4364EE4851DC302

View File

@ -146,20 +146,6 @@ impl CoreManager {
let clash_core = { Config::verge().latest().clash_core.clone() };
let mut clash_core = clash_core.unwrap_or("verge-mihomo".into());
// compatibility
if clash_core.contains("clash") {
clash_core = "verge-mihomo".to_string();
Config::verge().draft().patch_config(IVerge {
clash_core: Some("verge-mihomo".to_string()),
..IVerge::default()
});
Config::verge().apply();
match Config::verge().data().save_file() {
Ok(_) => handle::Handle::refresh_verge(),
Err(err) => log::error!(target: "app", "{err}"),
}
}
let config_path = dirs::path_to_str(&config_path)?;
let args = vec!["-d", app_dir, "-f", config_path];