We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
df
1 parent fcff358 commit d687dd8Copy full SHA for d687dd8
ctbcap
@@ -363,7 +363,7 @@ init_path() {
363
local _DIR="${DIR}"; while [ ! -d "${_DIR}" ]; do # ${DIR} may not created yet
364
local _DIR="$(dirname "${_DIR}")"
365
done
366
- local FREESPACE="$(( $(df -k "${_DIR}" | awk 'NR==2 {print $4}') / 1024 ))"
+ local FREESPACE="$(( $(df -Pk "${_DIR}" | awk 'NR==2 {print $4}') / 1024 ))"
367
[ "${FREESPACE}" -lt "${SPACE}" ] && {
368
log >&2 "(ERROR) Space on [${_DIR}/] must be bigger than ${SPACE}MiB! [${FREESPACE}MiB]"
369
return 1
0 commit comments