fix: Verify file is not empty

This commit is contained in:
Kroese 2024-04-16 14:59:08 +02:00 committed by GitHub
parent eeebfb4f09
commit 9845bcc2cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,7 +21,7 @@ fi
while true
do
if [ -f "$file" ]; then
if [ -s "$file" ]; then
bytes=$(du -sb "$file" | cut -f1)
if (( bytes > 1000 )); then
size=$(echo "$bytes" | numfmt --to=iec --suffix=B | sed -r 's/([A-Z])/ \1/')