fix: Verify file is not empty
This commit is contained in:
parent
eeebfb4f09
commit
9845bcc2cc
1 changed files with 1 additions and 1 deletions
|
|
@ -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/')
|
||||
|
|
|
|||
Loading…
Reference in a new issue