summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java b/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java
index b1b38189..e3eed074 100644
--- a/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java
+++ b/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java
@@ -48,6 +48,8 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -492,9 +494,16 @@ public class ConfigConverter extends BaseActivity implements FileSelectCallback,
if (path.indexOf(':') != -1 && path.lastIndexOf('/') > path.indexOf(':')) {
String possibleDir = path.substring(path.indexOf(':') + 1, path.length());
+ // Unquote chars in the path
+ try {
+ possibleDir = URLDecoder.decode(possibleDir, "UTF-8");
+ } catch (UnsupportedEncodingException ignored) {}
+
possibleDir = possibleDir.substring(0, possibleDir.lastIndexOf('/'));
+
+
dirlist.add(new File(sdcard, possibleDir));
}