From e528936c8dabffb983e6e222c89dd027e56f29ce Mon Sep 17 00:00:00 2001 From: DLmaster361 Date: Thu, 25 Sep 2025 23:54:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E6=88=96=E7=94=A8=E6=88=B7=E5=90=8E=E5=90=8C=E6=AD=A5=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=AF=B9=E5=BA=94=E4=BF=9D=E5=AD=98=E7=9A=84=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/core/config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/core/config.py b/app/core/config.py index db6f0e5..9a2b4f8 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -1068,6 +1068,8 @@ class AppConfig(GlobalConfig): await queue.QueueItem.remove(key) await self.ScriptConfig.remove(uid) + if (Path.cwd() / f"data/{uid}").exists(): + shutil.rmtree(Path.cwd() / f"data/{uid}") async def reorder_script(self, index_list: list[str]) -> None: """重新排序脚本""" @@ -1295,6 +1297,8 @@ class AppConfig(GlobalConfig): if isinstance(script_config, (MaaConfig | GeneralConfig)): await script_config.UserData.remove(uid) await self.ScriptConfig.save() + if (Path.cwd() / f"data/{script_id}/{user_id}").exists(): + shutil.rmtree(Path.cwd() / f"data/{script_id}/{user_id}") async def reorder_user(self, script_id: str, index_list: list[str]) -> None: """重新排序用户"""