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 | 02c364271bc75cae5c00faf3b01d2f4b85113d07 (patch) | |
tree | 2f54da1e3367a193228659a32612bd3daa4976e2 /src/de/blinkt/openvpn/VpnProfile.java | |
parent | 5e48e30e53bb7b42154866214217bf3f500ee7fd (diff) | |
parent | 2b811c50e5b5202eedab9d0a9768ec5e0d7168a3 (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 91c4c494..4e381fcc 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); |