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 { ...@@ -91,11 +91,17 @@ public class FilePickerFragment extends FileBrowserFragment {
} }
public boolean defineIsRoot() { public boolean defineIsRoot() {
String path = Strings.removeFileProtocole(mMrl); if (mMrl == null)
for (int i = 0; i < rootDirectories.length; ++i) { return true;
if (TextUtils.equals(path, rootDirectories[i])) if (mMrl.startsWith("file")) {
return true; 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; 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