diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-07-25 19:54:43 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-07-25 19:54:43 +0200 |
commit | 575523d46ebf0eb022a58138da998a09d756d493 (patch) | |
tree | 5db11ecb287d74a2fe6cbc637b59c00c0a02e939 /src/de/blinkt/openvpn/VpnProfile.java | |
parent | 2402e4db4da8ced807d061a3fd703ebd0580b92a (diff) | |
parent | 83dbf0d0df418a51e1f7c1a84ee0b7ae8171ee7e (diff) |
Merge
Diffstat (limited to 'src/de/blinkt/openvpn/VpnProfile.java')
-rw-r--r-- | src/de/blinkt/openvpn/VpnProfile.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java index 91c4c49..4e381fc 100644 --- a/src/de/blinkt/openvpn/VpnProfile.java +++ b/src/de/blinkt/openvpn/VpnProfile.java @@ -97,6 +97,7 @@ public class VpnProfile implements Serializable{ public boolean mUseDefaultRoutev6=true; public String mCustomRoutesv6=""; public String mKeyPassword=""; + static final String MINIVPN = "miniopenvpn"; @@ -116,7 +117,11 @@ public class VpnProfile implements Serializable{ String escapedString = unescaped.replace("\\", "\\\\"); escapedString = escapedString.replace("\"","\\\""); escapedString = escapedString.replace("\n","\\n"); - return '"' + escapedString + '"'; + + if (escapedString.equals(unescaped) && !escapedString.contains(" ")) + return unescaped; + else + return '"' + escapedString + '"'; } @@ -428,7 +433,7 @@ public class VpnProfile implements Serializable{ // Add fixed paramenters //args.add("/data/data/de.blinkt.openvpn/lib/openvpn"); - args.add(cacheDir.getAbsolutePath() +"/" +"miniovpn"); + args.add(cacheDir.getAbsolutePath() +"/" + VpnProfile.MINIVPN); args.add("--config"); args.add(cacheDir.getAbsolutePath() + "/" + OVPNCONFIGFILE); |