mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-08 11:02:08 +08:00
fix(proxies): move an unpicked GLOBAL off DIRECT to its first group
Keep DIRECT and REJECT listed in global mode.
This commit is contained in:
@@ -66,6 +66,12 @@ pub async fn change_clash_mode(mode: String) -> Result<(), String> {
|
||||
return Err(err.to_string().into());
|
||||
}
|
||||
|
||||
if mode.as_str() == "global"
|
||||
&& let Err(err) = crate::config::profiles::leave_default_global_exit().await
|
||||
{
|
||||
logging!(warn, Type::Core, "failed to move GLOBAL off its default: {err:#}");
|
||||
}
|
||||
|
||||
let clash = Config::clash().await;
|
||||
let save_result = {
|
||||
let _config_write = Config::lock_config_write().await;
|
||||
|
||||
Reference in New Issue
Block a user