From f477cecdebc4b9b556abb5a5f29c9c403cd71444 Mon Sep 17 00:00:00 2001
From: GyDi <zzzgydi@gmail.com>
Date: Wed, 23 Nov 2022 09:57:21 +0800
Subject: [PATCH] fix: regenerate config before change core

---
 src-tauri/src/core/core.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src-tauri/src/core/core.rs b/src-tauri/src/core/core.rs
index 87a51d8..e4e090e 100644
--- a/src-tauri/src/core/core.rs
+++ b/src-tauri/src/core/core.rs
@@ -222,6 +222,9 @@ impl CoreManager {
 
         Config::verge().draft().clash_core = Some(clash_core);
 
+        // 更新配置
+        Config::generate()?;
+
         self.check_config()?;
 
         // 清掉旧日志
-- 
GitLab