From ee5fd84d5187dbc4de9d044cdee85f8a3ecb6294 Mon Sep 17 00:00:00 2001 From: EillesWan Date: Tue, 23 Nov 2021 22:27:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E4=B8=8B=E6=97=A0=E6=B3=95=E6=9B=B4=E6=96=B0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=BD=8D=E7=BD=AE=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Musicreater.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Musicreater.py b/Musicreater.py index 397e4fb..380768b 100644 --- a/Musicreater.py +++ b/Musicreater.py @@ -178,8 +178,11 @@ def __main__(): os.chdir(__file__[:len(__file__)-__file__[len(__file__)::-1].index('\\')]) log("更新执行位置,当前文件位置"+__file__) else: - os.chdir(__file__[:len(__file__)-__file__[len(__file__)::-1].index('/')]) - log("其他平台:更新执行位置,当前文件位置"+__file__) + try: + os.chdir(__file__[:len(__file__)-__file__[len(__file__)::-1].index('/')]) + except: + pass + log("其他平台:"+sys.platform+"更新执行位置,当前文件位置"+__file__) print('完成!')