summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/LaunchVPN.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-05-10 10:53:21 +0200
committerArne Schwabe <arne@rfc2549.org>2012-05-10 10:53:21 +0200
commit11973ef9a293ca0eaa11e760a800071042c5a7bb (patch)
treed6f1f285dc422b51dc3374138ec0fff36fd30193 /src/de/blinkt/openvpn/LaunchVPN.java
parenta77da4c2fed8bcfe12d63b804d4f07c7fc978c9d (diff)
parentcc7f23dcefea2e255dcfe0f38031a3840288aafa (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.java6
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];