From fc75b4c7d5f60620768810ebf6c104be97104ddd Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 25 Jan 2018 15:59:11 +0100 Subject: [PATCH] check empty line at root file handling --- .../com/simplemobiletools/filemanager/helpers/RootHelpers.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 69368581..af0cacb7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/helpers/RootHelpers.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/helpers/RootHelpers.kt @@ -104,7 +104,7 @@ class RootHelpers { override fun commandCompleted(id: Int, exitcode: Int) { files.forEachIndexed { index, fileDirItem -> var line = lines[index] - if (line != "0") { + if (line.isNotEmpty() && line != "0") { line = line.substring(fileDirItem.path.length).trim() val size = line.split(" ")[0] if (size.areDigitsOnly()) {