diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-07-10 09:52:26 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-07-10 09:52:26 +0200 |
commit | f06687062fa9de5f784300181c3cd5b23bfe45f3 (patch) | |
tree | a3484d62ca0dbcb67441b3f5b635298238ef8f71 /src/de/blinkt/openvpn/ConfigConverter.java | |
parent | 46796d8a233835c20a44d8e1dcd2d2ad1a317b61 (diff) |
Fix duplicate inline tag (closes issue #51)
Diffstat (limited to 'src/de/blinkt/openvpn/ConfigConverter.java')
-rw-r--r-- | src/de/blinkt/openvpn/ConfigConverter.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/de/blinkt/openvpn/ConfigConverter.java b/src/de/blinkt/openvpn/ConfigConverter.java index 9b97cf14..101c90b0 100644 --- a/src/de/blinkt/openvpn/ConfigConverter.java +++ b/src/de/blinkt/openvpn/ConfigConverter.java @@ -136,7 +136,7 @@ public class ConfigConverter extends ListActivity { len = fis.read(buf);
}
fis.close();
- return filedata;
+ return VpnProfile.INLINE_TAG + filedata;
} catch (FileNotFoundException e) {
log(e.getLocalizedMessage());
} catch (IOException e) {
@@ -154,15 +154,16 @@ public class ConfigConverter extends ListActivity { // This where I would like to have a c++ style
// void embedFile(std::string & option)
- mResult.mCaFilename = VpnProfile.INLINE_TAG + embedFile(mResult.mCaFilename);
- mResult.mClientCertFilename = VpnProfile.INLINE_TAG + embedFile(mResult.mClientCertFilename);
- mResult.mClientKeyFilename = VpnProfile.INLINE_TAG + embedFile(mResult.mClientKeyFilename);
- mResult.mTLSAuthFilename = VpnProfile.INLINE_TAG + embedFile(mResult.mTLSAuthFilename);
+ mResult.mCaFilename = embedFile(mResult.mCaFilename);
+ mResult.mClientCertFilename = embedFile(mResult.mClientCertFilename);
+ mResult.mClientKeyFilename = embedFile(mResult.mClientKeyFilename);
+ mResult.mTLSAuthFilename = embedFile(mResult.mTLSAuthFilename);
if(mResult.mUsername != null && !mResult.mUsername.equals("")){
String data =embedFile(mResult.mUsername);
mResult.mName=null;
if(data!=null) {
+ data = data.replace(VpnProfile.INLINE_TAG, "");
String[] parts = data.split("\n");
if(parts.length >= 2) {
mResult.mName=parts[0];
|