File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/com/owncloud/android/datastorage/providers Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2525
2626import java .util .Locale ;
2727import java .util .Vector ;
28+ import java .util .regex .Pattern ;
2829
2930/**
3031 * @author Bartosz Przybylski
@@ -33,6 +34,8 @@ public class MountCommandStoragePointProvider extends AbstractCommandLineStorage
3334
3435 static private final String [] sCommand = new String [] { "mount" };
3536
37+ private static Pattern sPattern = Pattern .compile ("(?i).*vold.*(vfat|ntfs|exfat|fat32|ext3|ext4).*rw.*" );
38+
3639 @ Override
3740 protected String [] getCommand () {
3841 return sCommand ;
@@ -51,10 +54,9 @@ public Vector<StoragePoint> getAvailableStoragePoint() {
5154
5255 private Vector <String > getPotentialPaths (String mounted ) {
5356 final Vector <String > result = new Vector <>();
54- final String reg = "(?i).*vold.*(vfat|ntfs|exfat|fat32|ext3|ext4).*rw.*" ;
5557
5658 for (String line : mounted .split ("\n " ))
57- if (!line .toLowerCase (Locale .US ).contains ("asec" ) && line .matches (reg )) {
59+ if (!line .toLowerCase (Locale .US ).contains ("asec" ) && sPattern . matcher ( line ) .matches ()) {
5860 String parts [] = line .split (" " );
5961 for (String path : parts ) {
6062 if (path .startsWith ("/" ) &&
You can’t perform that action at this time.
0 commit comments