diff options
| -rw-r--r-- | src/com/cyanogenmod/filemanager/util/ParseHelper.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/com/cyanogenmod/filemanager/util/ParseHelper.java b/src/com/cyanogenmod/filemanager/util/ParseHelper.java index 7129af5..6b1fa4f 100644 --- a/src/com/cyanogenmod/filemanager/util/ParseHelper.java +++ b/src/com/cyanogenmod/filemanager/util/ParseHelper.java @@ -311,20 +311,29 @@ public final class ParseHelper { line = line.substring(pos).trim(); // Skip "on" pos = line.indexOf(" "); //$NON-NLS-1$ - line = line.substring(pos).trim(); + if ("on".equals(line.substring(0, pos).trim())) { + line = line.substring(pos).trim(); + } // Mount point pos = line.indexOf(" "); //$NON-NLS-1$ String mountPoint = line.substring(0, pos).trim(); line = line.substring(pos).trim(); // Skip "type" pos = line.indexOf(" "); //$NON-NLS-1$ - line = line.substring(pos).trim(); + if ("type".equals(line.substring(0, pos).trim())) { + line = line.substring(pos).trim(); + } // Type pos = line.indexOf(" "); //$NON-NLS-1$ String type = line.substring(0, pos).trim(); line = line.substring(pos).trim(); // Options - String options = line.substring(1, line.length() - 1).trim(); + String options; + if (line.charAt(0) == '(') { + options = line.substring(1, line.length() - 1).trim(); + } else { + options = line.trim(); + } //Return the mount point return new MountPoint(mountPoint, device, type, options, /*dump*/0, /*pass*/0, false, false); |
