Fix exception reported on Google Play

This commit is contained in:
Synced Synapse 2015-04-13 23:29:20 +01:00
parent 27d82d31ca
commit e5a82517bb
1 changed files with 3 additions and 1 deletions

View File

@ -446,7 +446,9 @@ public class MediaFileListFragment extends Fragment {
p = path.substring(0, path.length() - 1);
}
p = p.substring(0, p.lastIndexOf(pathSymbol));
if (p.lastIndexOf(pathSymbol) != -1) {
p = p.substring(0, p.lastIndexOf(pathSymbol));
}
p = p + pathSymbol; // add it back to make it look like path
return p;
}