From a3918a5aee5611d129f0b25bccee35909eb7b9fd Mon Sep 17 00:00:00 2001 From: MuWinds Date: Mon, 31 Mar 2025 13:15:42 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84=E6=97=B6=E5=80=99=E5=85=88?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E7=9B=AE=E5=BD=95=EF=BC=8C=E5=90=A6=E5=88=99?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E6=96=87=E4=BB=B6=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E6=8A=A5=E9=94=99=EF=BC=9AFileNotFoundError:=20[WinError=203]?= =?UTF-8?q?=20=E7=B3=BB=E7=BB=9F=E6=89=BE=E4=B8=8D=E5=88=B0=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E7=9A=84=E8=B7=AF=E5=BE=84=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/config/config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/config/config.py b/src/plugins/config/config.py index a4a38dc1a..bf2463bf8 100644 --- a/src/plugins/config/config.py +++ b/src/plugins/config/config.py @@ -43,6 +43,8 @@ def update_config(): # 检查配置文件是否存在 if not old_config_path.exists(): logger.info("配置文件不存在,从模板创建新配置") + #创建文件夹 + old_config_dir.mkdir(parents=True, exist_ok=True) shutil.copy2(template_path, old_config_path) logger.info(f"已创建新配置文件,请填写后重新运行: {old_config_path}") # 如果是新创建的配置文件,直接返回