mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-02-18 12:50:35 +01:00
use "stat -t" for getting root file sizes, "stat -c" isnt available in busybox
This commit is contained in:
parent
861f9ff8dc
commit
3b00a37895
@ -90,7 +90,7 @@ class RootHelpers {
|
|||||||
cmd += if (it.isDirectory) {
|
cmd += if (it.isDirectory) {
|
||||||
"echo 0;"
|
"echo 0;"
|
||||||
} else {
|
} else {
|
||||||
"stat -c %s ${it.path};"
|
"stat -t ${it.path};"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,9 +103,13 @@ class RootHelpers {
|
|||||||
|
|
||||||
override fun commandCompleted(id: Int, exitcode: Int) {
|
override fun commandCompleted(id: Int, exitcode: Int) {
|
||||||
files.forEachIndexed { index, fileDirItem ->
|
files.forEachIndexed { index, fileDirItem ->
|
||||||
val size = lines[index]
|
var line = lines[index]
|
||||||
if (size.areDigitsOnly()) {
|
if (line != "0") {
|
||||||
fileDirItem.size = size.toLong()
|
line = line.substring(fileDirItem.path.length).trim()
|
||||||
|
val size = line.split(" ")[0]
|
||||||
|
if (size.areDigitsOnly()) {
|
||||||
|
fileDirItem.size = size.toLong()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
callback(path, files)
|
callback(path, files)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user