Skip to content

Commit

Permalink
Merge pull request #5580 from ipfs/fix/5577
Browse files Browse the repository at this point in the history
test the correct return value
  • Loading branch information
Stebalien authored Oct 12, 2018
2 parents 5551c19 + 67ea8dd commit 1efe392
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/sharness/lib/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1efe392

Please sign in to comment.