From e32fc27728ea439cca1bb675b4e5ec0115b73855 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Sat, 13 May 2023 14:23:05 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E5=88=A0=E9=99=A4=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/command/command.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/model/command/command.py b/model/command/command.py index e0f39c42..121ae7a1 100644 --- a/model/command/command.py +++ b/model/command/command.py @@ -109,7 +109,8 @@ class Command: if role != "admin": return False, f"你的身份组{role}没有权限删除插件", "plugin" try: - os.removedirs(os.path.join(ppath, l[2])) + # 删除文件夹 + os.rmdir(os.path.join(ppath, l[2])) if l[2] in self.cached_plugins: del self.cached_plugins[l[2]] return True, "插件卸载成功~", "plugin"