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 | 11973ef9a293ca0eaa11e760a800071042c5a7bb (patch) | |
tree | d6f1f285dc422b51dc3374138ec0fff36fd30193 /src/de/blinkt/openvpn/LaunchVPN.java | |
parent | a77da4c2fed8bcfe12d63b804d4f07c7fc978c9d (diff) | |
parent | cc7f23dcefea2e255dcfe0f38031a3840288aafa (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 858c8d3..8aeb996 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]; |