From 86ea11db0fef55bbda445bc25278d7931fb2e109 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 4 May 2024 16:13:25 +0200 Subject: [PATCH] Update progress.sh --- src/progress.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/progress.sh b/src/progress.sh index be3cba5..e50d65e 100644 --- a/src/progress.sh +++ b/src/progress.sh @@ -25,7 +25,7 @@ do if [ -s "$file" ]; then bytes=$(du -sb "$file" | cut -f1) if (( bytes > 1000 )); then - if [ -z "$total" ]; then + if [ -z "$total" ] || [[ "$total" == "0" ]]; then size=$(numfmt --to=iec --suffix=B "$bytes" | sed -r 's/([A-Z])/ \1/') else size=$(printf '%.1f\n' "$((bytes*100*100/total))e-2")