From 0d23c0900ba4815324cc4192f9f763e144fb456a Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Sat, 13 May 2023 13:28:18 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E5=8D=B8=E8=BD=BD=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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/model/command/command.py b/model/command/command.py index a64ab098..520d143b 100644 --- a/model/command/command.py +++ b/model/command/command.py @@ -106,6 +106,8 @@ class Command: elif l[1] == "d": try: os.remove(os.path.join(ppath, l[2])) + if l[2] in self.cached_plugins: + del self.cached_plugins[l[2]] return True, "插件卸载成功~", "plugin" except BaseException as e: return False, f"卸载插件失败,原因: {str(e)}", "plugin"