Fix possible error block counts

Add "-k" parameter to force the unit to 1024 bytes.
This commit is contained in:
Pzqqt 2018-12-05 20:24:49 +08:00 committed by John Wu
parent a868118f6f
commit 1cff08ce5d
1 changed files with 1 additions and 1 deletions

View File

@ -392,7 +392,7 @@ request_zip_size_check() {
check_filesystem() {
curSizeM=`wc -c < $1`
curSizeM=$((curSizeM / 1048576))
local DF=`df -P $2 | grep $2`
local DF=`df -Pk $2 | grep $2`
curUsedM=`echo $DF | awk '{ print int($3 / 1024) }'`
curFreeM=`echo $DF | awk '{ print int($4 / 1024) }'`
}