Skip to content
Snippets Groups Projects
Commit f470cfb0 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Fix FilePicker browsing

parent f190d4a3
No related branches found
No related tags found
No related merge requests found
......@@ -91,11 +91,17 @@ public class FilePickerFragment extends FileBrowserFragment {
}
public boolean defineIsRoot() {
String path = Strings.removeFileProtocole(mMrl);
for (int i = 0; i < rootDirectories.length; ++i) {
if (TextUtils.equals(path, rootDirectories[i]))
return true;
}
if (mMrl == null)
return true;
if (mMrl.startsWith("file")) {
String path = Strings.removeFileProtocole(mMrl);
for (int i = 0; i < rootDirectories.length; ++i) {
if (path.startsWith(rootDirectories[i]))
return false;
}
return true;
} else if (TextUtils.isEmpty(Uri.parse(mMrl).getPath()))
return true;
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment