move the super.commandOutput as the last function

This commit is contained in:
tibbi 2017-09-03 18:19:16 +02:00
parent 80d834e7eb
commit 2bf39803de
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,6 @@ class RootHelpers {
fun getFiles(path: String, callback: (fileDirItems: ArrayList<FileDirItem>) -> Unit) {
val command = object : Command(0, "ls -la $path | awk '{print \$1,\$NF}'") {
override fun commandOutput(id: Int, line: String) {
super.commandOutput(id, line)
val parts = line.split(" ")
val files = ArrayList<FileDirItem>()
@ -18,6 +17,7 @@ class RootHelpers {
val fileDirItem = FileDirItem(filePath, filename, isDirectory, 0, 0)
files.add(fileDirItem)
callback(files)
super.commandOutput(id, line)
}
override fun commandTerminated(id: Int, reason: String?) {