Commit c13cf6f5 authored by chentao's avatar chentao

Fix a issue in ProcessUtils

parent cacde5cf
...@@ -33,8 +33,14 @@ object ProcessUtils { ...@@ -33,8 +33,14 @@ object ProcessUtils {
} }
} }
def inShadowsocks[A](fun: => A): Unit = def inShadowsocks[A](fun: => A): Unit = {
if(getCurrentProcessName startsWith SHADOWNSOCKS) fun val pName = getCurrentProcessName
if (pName.equals(SHADOWNSOCKS)
|| (pName.startsWith(SHADOWNSOCKS) && pName.length > SHADOWNSOCKS.length && pName.charAt(SHADOWNSOCKS.length) != ':')){
fun
}
}
def inVpn[A](fun: => A): Unit = def inVpn[A](fun: => A): Unit =
if (getCurrentProcessName startsWith SHADOWNSOCKS_VPN) fun if (getCurrentProcessName startsWith SHADOWNSOCKS_VPN) fun
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment