diff --git a/rclone.sh b/rclone.sh index 070ae48..a89a1ad 100755 --- a/rclone.sh +++ b/rclone.sh @@ -26,7 +26,7 @@ function gzipVMbackups { # loop through VM backups and tar/gzip them to single file for dir in /mnt/data-pool/esxi/backups/*/*/; do - if [ ! -z "$dir" ]; + if [ -n "$dir" ]; then # get the folder name of the backup base=$(basename "${dir}") # had to cd into the directoy since tar -C $dir was not working for me with relative path