Unverified 提交 1efe3927 作者: Steven Allen 提交者: GitHub

Merge pull request #5580 from ipfs/fix/5577

test the correct return value
......@@ -405,13 +405,13 @@ directory_size() {
find "$1" -type f | ( while read fname; do
fsize=$(file_size "$fname")
res=$?
if ! test $? -eq 0; then
if ! test $res -eq 0; then
echo "failed to get filesize" >&2
return $res
fi
total=$(expr "$total" + "$fsize")
res=$?
if ! test $? -eq 0; then
if ! test $res -eq 0; then
echo "filesize not a number: $fsize" >&2
return $res
fi
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论