From 88be274ecee5b6cd765c25b61ac0d0a718a6080d 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: Tue, 30 Jul 2024 13:19:54 +0800 Subject: [PATCH] fix --- LunaTranslator/LunaTranslator/LunaTranslator_main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/LunaTranslator/LunaTranslator/LunaTranslator_main.py b/LunaTranslator/LunaTranslator/LunaTranslator_main.py index 86c2229c..bcde5d97 100644 --- a/LunaTranslator/LunaTranslator/LunaTranslator_main.py +++ b/LunaTranslator/LunaTranslator/LunaTranslator_main.py @@ -156,6 +156,13 @@ def switchdir(): # 0 是当前目录 # 后面的是系统库或runtime # 由于自动更新不会删除,runtime下可能有历史遗留的同名文件被优先导入 + import shutil + + # 远古版本的遗留文件,同名导入冲突 + try: + shutil.rmtree("./LunaTranslator/requests") + except: + pass if __name__ == "__main__":