Commit f470cfb0 authored by Geoffrey Métais's avatar Geoffrey Métais

Fix FilePicker browsing

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