From 092d880c7d5e638106138f7fa9a33fb3854f978f Mon Sep 17 00:00:00 2001 From: Max Lv Date: Wed, 29 Jul 2015 13:49:08 +0800 Subject: [PATCH] refine binary install --- .../scala/com/github/shadowsocks/Shadowsocks.scala | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/scala/com/github/shadowsocks/Shadowsocks.scala b/src/main/scala/com/github/shadowsocks/Shadowsocks.scala index 205ef80d..7775f854 100644 --- a/src/main/scala/com/github/shadowsocks/Shadowsocks.scala +++ b/src/main/scala/com/github/shadowsocks/Shadowsocks.scala @@ -480,7 +480,7 @@ class Shadowsocks status.edit.putBoolean(getVersionName, true).apply() currentProfile = profileManager.create() spawn { - reset() + install() h.sendEmptyMessage(0) } } @@ -916,10 +916,7 @@ class Shadowsocks Console.runRootCommand(ab.toArray) } - def reset() { - - crashRecovery() - + def install() { copyAssets(System.getABI) val ab = new ArrayBuffer[String] @@ -927,7 +924,13 @@ class Shadowsocks ab.append("chmod 755 " + Path.BASE + executable) } Console.runCommand(ab.toArray) + } + def reset() { + + crashRecovery() + + install() } private def recovery() {