diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-07-25 15:22:47 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-07-25 15:22:47 +0200 |
commit | c3287935914ef81941bc65a6ff9956a074fbc32a (patch) | |
tree | 276cdaab8f83e1f6adf4468426ad33b0d3003871 /src/de/blinkt/openvpn/VpnProfile.java | |
parent | 2d1ba27de2ed0b477f88ed8cc64fcccd709d8221 (diff) |
Fix importing custom options with spaces
Diffstat (limited to 'src/de/blinkt/openvpn/VpnProfile.java')
-rw-r--r-- | src/de/blinkt/openvpn/VpnProfile.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java index f6c3261a..4e381fcc 100644 --- a/src/de/blinkt/openvpn/VpnProfile.java +++ b/src/de/blinkt/openvpn/VpnProfile.java @@ -117,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 + '"'; } |