File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
app/src/main/kotlin/com/simplemobiletools/filemanager/helpers Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ class RootHelpers {
9090 cmd + = if (it.isDirectory) {
9191 " echo 0;"
9292 } else {
93- " stat -c %s ${it.path} ;"
93+ " stat -t ${it.path} ;"
9494 }
9595 }
9696
@@ -103,9 +103,13 @@ class RootHelpers {
103103
104104 override fun commandCompleted (id : Int , exitcode : Int ) {
105105 files.forEachIndexed { index, fileDirItem ->
106- val size = lines[index]
107- if (size.areDigitsOnly()) {
108- fileDirItem.size = size.toLong()
106+ var line = lines[index]
107+ if (line != " 0" ) {
108+ line = line.substring(fileDirItem.path.length).trim()
109+ val size = line.split(" " )[0 ]
110+ if (size.areDigitsOnly()) {
111+ fileDirItem.size = size.toLong()
112+ }
109113 }
110114 }
111115 callback(path, files)
You can’t perform that action at this time.
0 commit comments