diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-05-10 10:53:21 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-05-10 10:53:21 +0200 |
commit | 6008ca11d6c8cbad981f114ec231295800a4489f (patch) | |
tree | d6f1f285dc422b51dc3374138ec0fff36fd30193 /src/de/blinkt/openvpn/LaunchVPN.java | |
parent | 82b3869f5d2e7cc3b67e272ebf3565df58c922cf (diff) | |
parent | c7c118c07a00c6a8c1f44e1736dfe75d55b92884 (diff) |
Version 0.5.2
Fix minivpn vs openvpn. (closes issue #16)
If minivpn binary is already available don't write it (closes issue #15)
Diffstat (limited to 'src/de/blinkt/openvpn/LaunchVPN.java')
-rw-r--r-- | src/de/blinkt/openvpn/LaunchVPN.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/de/blinkt/openvpn/LaunchVPN.java b/src/de/blinkt/openvpn/LaunchVPN.java index 858c8d38..8aeb9960 100644 --- a/src/de/blinkt/openvpn/LaunchVPN.java +++ b/src/de/blinkt/openvpn/LaunchVPN.java @@ -212,11 +212,15 @@ public class LaunchVPN extends ListActivity implements OnItemClickListener { } private boolean writeMiniVPN() { + File mvpnout = new File(getCacheDir(),"minivpn"); + if (mvpnout.exists() && mvpnout.canExecute()) + return true; + if(minivpnwritten) return true; try { InputStream mvpn = getAssets().open("minivpn"); - File mvpnout = new File(getCacheDir(),"minivpn"); + FileOutputStream fout = new FileOutputStream(mvpnout); byte buf[]= new byte[4096]; |