fix: Verify files are not empty (#689)

This commit is contained in:
Kroese
2024-04-16 15:35:35 +02:00
committed by GitHub
parent 5015597183
commit e81dc0f31d
7 changed files with 27 additions and 25 deletions

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/')