mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
feat: add clash_core config validation & auto-fix to default; fixed "No such file or directory (os error 2)"
This commit is contained in:
@@ -286,6 +286,9 @@ pub fn init_config() -> Result<()> {
|
||||
<Result<()>>::Ok(())
|
||||
}));
|
||||
|
||||
// 验证并修正verge.yaml中的clash_core配置
|
||||
crate::log_err!(IVerge::validate_and_fix_config());
|
||||
|
||||
crate::log_err!(dirs::profiles_path().map(|path| {
|
||||
if !path.exists() {
|
||||
help::save_yaml(&path, &IProfiles::template(), Some("# Clash Verge"))?;
|
||||
|
||||
Reference in New Issue
Block a user