From 220d72c16b9f142a50c24e480569104ba0b5a63a Mon Sep 17 00:00:00 2001 From: lunzhipenxil Date: Fri, 21 Jan 2022 21:04:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A8=A1=E5=9D=97=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OlivaDiceMaster/app.json | 4 ++-- OlivaDiceMaster/data.py | 4 ++-- OlivaDiceMaster/msgReply.py | 7 ++++++- OlivaDiceMaster/webTool.py | 6 ++++-- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/OlivaDiceMaster/app.json b/OlivaDiceMaster/app.json index c10e934..7b52138 100644 --- a/OlivaDiceMaster/app.json +++ b/OlivaDiceMaster/app.json @@ -3,8 +3,8 @@ "author" : "lunzhiPenxil", "namespace" : "OlivaDiceMaster", "message_mode" : "old_string", - "version" : "3.0.0", - "svn" : 1, + "version" : "3.0.1", + "svn" : 2, "compatible_svn" : 81, "priority" : 30020, "support" : [ diff --git a/OlivaDiceMaster/data.py b/OlivaDiceMaster/data.py index 8d89153..d5c7ecf 100644 --- a/OlivaDiceMaster/data.py +++ b/OlivaDiceMaster/data.py @@ -15,8 +15,8 @@ ''' -OlivaDiceMaster_ver = '3.0.0' -OlivaDiceMaster_svn = 1 +OlivaDiceMaster_ver = '3.0.1' +OlivaDiceMaster_svn = 2 OlivaDiceMaster_ver_short = '%s(%s)' % (str(OlivaDiceMaster_ver), str(OlivaDiceMaster_svn)) OlivaDiceMaster_oopm_host = 'https://api.dice.center/OlivaDiceVer' diff --git a/OlivaDiceMaster/msgReply.py b/OlivaDiceMaster/msgReply.py index 13a119d..1654bfd 100644 --- a/OlivaDiceMaster/msgReply.py +++ b/OlivaDiceMaster/msgReply.py @@ -283,6 +283,7 @@ def unity_reply(plugin_event, Proc): tmp_omodel_ver_compare, tmp_omodel_ver_target ) + flag_done_this = True while tmp_omodel_ver_compare in ['=>']: flag_download = False flag_copy = False @@ -297,6 +298,7 @@ def unity_reply(plugin_event, Proc): tmp_reply_str = dictStrCustom['strMasterOopmDownloadFailed'].format(**dictTValue) replyMsg(plugin_event, tmp_reply_str) flag_done = False + flag_done_this = False break try: shutil.copyfile( @@ -310,6 +312,7 @@ def unity_reply(plugin_event, Proc): tmp_reply_str = dictStrCustom['strMasterOopmCopyFailed'].format(**dictTValue) replyMsg(plugin_event, tmp_reply_str) flag_done = False + flag_done_this = False break tmp_reply_str = dictStrCustom['strMasterOopmUpdate'].format(**dictTValue) replyMsg(plugin_event, tmp_reply_str) @@ -321,12 +324,14 @@ def unity_reply(plugin_event, Proc): elif tmp_omodel_ver_compare in ['[DEV]=×']: tmp_reply_str = dictStrCustom['strMasterOopmUpdateNotSkipDev'].format(**dictTValue) replyMsg(plugin_event, tmp_reply_str) + if not flag_done_this: + break if flag_done and flag_need_done: tmp_reply_str = dictStrCustom['strMasterOopmUpdateAllDone'].format(**dictTValue) replyMsg(plugin_event, tmp_reply_str) time.sleep(1) Proc.set_restart() - elif not flag_need_done: + elif flag_done and not flag_need_done: tmp_reply_str = dictStrCustom['strMasterOopmUpdateNotNeed'].format(**dictTValue) replyMsg(plugin_event, tmp_reply_str) elif flag_api_ok: diff --git a/OlivaDiceMaster/webTool.py b/OlivaDiceMaster/webTool.py index 279582c..990684e 100644 --- a/OlivaDiceMaster/webTool.py +++ b/OlivaDiceMaster/webTool.py @@ -63,11 +63,13 @@ def releaseDir(dir_path): def releaseToDir(dir_path): tmp_path_list = dir_path.rstrip('/').split('/') for tmp_path_list_index in range(len(tmp_path_list)): - releaseDir('/'.join(tmp_path_list[:tmp_path_list_index + 1])) + if tmp_path_list[tmp_path_list_index] != '': + releaseDir('/'.join(tmp_path_list[:tmp_path_list_index + 1])) def releaseToDirForFile(dir_path): tmp_path_list = dir_path.rstrip('/').split('/') if len(tmp_path_list) > 0: tmp_path_list = tmp_path_list[:-1] for tmp_path_list_index in range(len(tmp_path_list)): - releaseDir('/'.join(tmp_path_list[:tmp_path_list_index + 1])) + if tmp_path_list[tmp_path_list_index] != '': + releaseDir('/'.join(tmp_path_list[:tmp_path_list_index + 1]))