From 34cd7ac1acb3b3ef7f64b7b65facff362f92d353 Mon Sep 17 00:00:00 2001 From: ColdWindScholar <3590361911@qq.com> Date: Sat, 30 Sep 2023 23:26:50 +0800 Subject: [PATCH] Fix Unpack Crash --- run.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/run.py b/run.py index a04b65e..e484f40 100644 --- a/run.py +++ b/run.py @@ -461,7 +461,12 @@ def subbed(project): print() op_pro = input("请输入序号:") if op_pro == '66': - pass + path = input("请输入插件路径或[拖入]:") + if os.path.exists(path): + install(path) + else: + ywarn(f"{path}不存在!") + time.sleep(2) elif op_pro == '77': chose = input("输入插件序号:") if int(chose) in mysubs.keys(): @@ -475,10 +480,18 @@ def subbed(project): return elif op_pro.isdigit(): if int(op_pro) in mysubs.keys(): - call(f'busybox ash {binner + os.sep + "subs" + os.sep + mysubs[int(op_pro)] + os.sep + "run.sh"} {project}') + if os.path.exists(binner + os.sep + "subs" + os.sep + mysubs[int(op_pro)] + os.sep + "run.sh"): + call(f'busybox ash {binner + os.sep + "subs" + os.sep + mysubs[int(op_pro)] + os.sep + "run.sh"} {project}') + else: + ywarn(f"{mysubs[int(op_pro)]}已损坏!请手动卸载") + time.sleep(2) subbed(project) +def install(plugin): + pass + + def unpackChoo(project): cls() os.chdir(project)