forked from Mirror/pmbootstrap
pmb.helpers.other.folder_size: use kilobytes (MR 2074)
busybox du doesn't support bytes or custom block sizes.
This commit is contained in:
parent
5c1da79634
commit
31e7a0006d
4 changed files with 6 additions and 7 deletions
|
@ -17,10 +17,9 @@ def folder_size(args, path):
|
|||
faster than doing the same task in pure Python). This result is only
|
||||
approximatelly right, but good enough for pmbootstrap's use case (#760).
|
||||
|
||||
:returns: folder size in bytes
|
||||
:returns: folder size in kilobytes
|
||||
"""
|
||||
output = pmb.helpers.run.root(args, ["du", "--summarize",
|
||||
"--block-size=1",
|
||||
output = pmb.helpers.run.root(args, ["du", "-ks",
|
||||
path], output_return=True)
|
||||
|
||||
# Only look at last line to filter out sudo garbage (#1766)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue