diff options
-rw-r--r-- | icsopenvpn.iml | 8 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/ConfigConverter.java | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/icsopenvpn.iml b/icsopenvpn.iml index c0ba6aa7..ad327925 100644 --- a/icsopenvpn.iml +++ b/icsopenvpn.iml @@ -23,10 +23,10 @@ <output url="file://$MODULE_DIR$/build/classes/debug" /> <exclude-output /> <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/build/source/r/debug" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/build/source/aidl/debug" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/build/source/rs/debug" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/build/source/buildConfig/debug" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/build/source/r/debug" isTestSource="false" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/source/aidl/debug" isTestSource="false" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/source/rs/debug" isTestSource="false" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/source/buildConfig/debug" isTestSource="false" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/res/rs/debug" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/build/source/r/test" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/build/source/aidl/test" isTestSource="true" /> diff --git a/src/de/blinkt/openvpn/ConfigConverter.java b/src/de/blinkt/openvpn/ConfigConverter.java index 75620455..d0782a8a 100644 --- a/src/de/blinkt/openvpn/ConfigConverter.java +++ b/src/de/blinkt/openvpn/ConfigConverter.java @@ -188,7 +188,7 @@ public class ConfigConverter extends ListActivity { if(mResult.mName!=null && !ConfigParser.CONVERTED_PROFILE.equals(mResult.mName)) newname=mResult.mName; - while(vpl.getProfileByName(newname)!=null) { + while(newname==null || vpl.getProfileByName(newname)!=null) { i++; if(i==1) newname = getString(R.string.converted_profile); @@ -368,7 +368,10 @@ public class ConfigConverter extends ListActivity { //log(R.string.import_experimental); log(R.string.importing_config,data.toString()); try { - if(data.getScheme().equals("file")) { + if(data.getScheme().equals("file") || + data.getLastPathSegment().endsWith(".ovpn") || + data.getLastPathSegment().endsWith(".conf")) + { mPossibleName = data.getLastPathSegment(); if(mPossibleName!=null){ mPossibleName =mPossibleName.replace(".ovpn", ""); |