make sure we dont trim out the slash of root folder
This commit is contained in:
parent
b8c1e9bdfb
commit
b35a8a74a0
|
@ -190,7 +190,10 @@ class ItemsFragment : Fragment(), ItemsAdapter.ItemOperationsListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getRootItemsOf(path: String, callback: (items: ArrayList<FileDirItem>) -> Unit) {
|
private fun getRootItemsOf(path: String, callback: (items: ArrayList<FileDirItem>) -> Unit) {
|
||||||
RootHelpers().getFiles(activity as SimpleActivity, path.trimEnd('/'), callback)
|
var wantedPath = path.trimEnd('/')
|
||||||
|
if (wantedPath.isEmpty())
|
||||||
|
wantedPath = "/"
|
||||||
|
RootHelpers().getFiles(activity as SimpleActivity, wantedPath, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getChildren(file: File): Int {
|
private fun getChildren(file: File): Int {
|
||||||
|
|
Loading…
Reference in New Issue