mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-02-18 12:50:35 +01:00
move the super.commandOutput as the last function
This commit is contained in:
parent
80d834e7eb
commit
2bf39803de
@ -8,7 +8,6 @@ class RootHelpers {
|
|||||||
fun getFiles(path: String, callback: (fileDirItems: ArrayList<FileDirItem>) -> Unit) {
|
fun getFiles(path: String, callback: (fileDirItems: ArrayList<FileDirItem>) -> Unit) {
|
||||||
val command = object : Command(0, "ls -la $path | awk '{print \$1,\$NF}'") {
|
val command = object : Command(0, "ls -la $path | awk '{print \$1,\$NF}'") {
|
||||||
override fun commandOutput(id: Int, line: String) {
|
override fun commandOutput(id: Int, line: String) {
|
||||||
super.commandOutput(id, line)
|
|
||||||
val parts = line.split(" ")
|
val parts = line.split(" ")
|
||||||
|
|
||||||
val files = ArrayList<FileDirItem>()
|
val files = ArrayList<FileDirItem>()
|
||||||
@ -18,6 +17,7 @@ class RootHelpers {
|
|||||||
val fileDirItem = FileDirItem(filePath, filename, isDirectory, 0, 0)
|
val fileDirItem = FileDirItem(filePath, filename, isDirectory, 0, 0)
|
||||||
files.add(fileDirItem)
|
files.add(fileDirItem)
|
||||||
callback(files)
|
callback(files)
|
||||||
|
super.commandOutput(id, line)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun commandTerminated(id: Int, reason: String?) {
|
override fun commandTerminated(id: Int, reason: String?) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user