feat: add clash_core config validation & auto-fix to default; fixed "No such file or directory (os error 2)"

This commit is contained in:
wonfen
2025-06-16 20:27:02 +08:00
parent 2a0e1e206e
commit 26acce94a4
6 changed files with 107 additions and 26 deletions

View File

@@ -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"))?;