From a46f69283308b18216bf2fd51610c05ba0cded08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Sat, 31 Aug 2024 18:44:55 +0800 Subject: [PATCH] fix --- LunaTranslator/LunaTranslator/textsource/texthook.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/LunaTranslator/LunaTranslator/textsource/texthook.py b/LunaTranslator/LunaTranslator/textsource/texthook.py index 3d4a4add..d7089c7e 100644 --- a/LunaTranslator/LunaTranslator/textsource/texthook.py +++ b/LunaTranslator/LunaTranslator/textsource/texthook.py @@ -179,11 +179,10 @@ class texthook(basetext): tgt = gobject.getcachedir("update/LunaHook") with zipfile.ZipFile(savep) as zipf: zipf.extractall(tgt) - shutil.rmtree("files/plugins/LunaHook") if os.path.exists(os.path.join(tgt, "Release_English", "LunaHook32.dll")): - shutil.move(os.path.join(tgt, "Release_English"), "files/plugins/LunaHook") + copytree(os.path.join(tgt, "Release_English"), "files/plugins/LunaHook") else: - shutil.move(tgt, "files/plugins/LunaHook") + copytree(tgt, "files/plugins/LunaHook") def init(self): self.pids = []