diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/helpers/RootHelpers.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/helpers/RootHelpers.kt index 888898e5..6c5116d0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/helpers/RootHelpers.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/helpers/RootHelpers.kt @@ -42,7 +42,12 @@ class RootHelpers { } override fun commandCompleted(id: Int, exitcode: Int) { - getChildrenCount(activity, files, path, callback) + if (files.isEmpty()) { + callback(path, files) + } else { + getChildrenCount(activity, files, path, callback) + } + super.commandCompleted(id, exitcode) } }