From 1e043dcd18f03d39b7984cb7b77b5e06da13cea6 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Thu, 16 Jan 2014 19:57:52 +0100 Subject: Fix bug when importing on 4.4 --HG-- extra : amend_source : 39d68a0f95dec4744a56576009bb7f0ae08e0f17 --- src/de/blinkt/openvpn/activities/ConfigConverter.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/de/blinkt') diff --git a/src/de/blinkt/openvpn/activities/ConfigConverter.java b/src/de/blinkt/openvpn/activities/ConfigConverter.java index 4fa66449..78eb4a2c 100644 --- a/src/de/blinkt/openvpn/activities/ConfigConverter.java +++ b/src/de/blinkt/openvpn/activities/ConfigConverter.java @@ -262,14 +262,18 @@ public class ConfigConverter extends ListActivity { // Do a little hackish dance for the Android File Importer // /document/primary:ovpn/openvpn-imt.conf + if (path.indexOf(':')!=-1) { String possibleDir = path.substring(path.indexOf(':')+1,path.length()); - possibleDir.substring(0,possibleDir.lastIndexOf('/')); - dirlist.add(new File(sdcard,possibleDir)); + possibleDir = possibleDir.substring(0,possibleDir.lastIndexOf('/')); + + dirlist.add(new File(sdcard,possibleDir)); } dirlist.add(new File(path)); + + } dirlist.add(sdcard); dirlist.add(root); -- cgit v1.2.3