diff options
-rwxr-xr-x | geo-replication/src/gverify.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/geo-replication/src/gverify.sh b/geo-replication/src/gverify.sh index c5593a39f11..e661267ce50 100755 --- a/geo-replication/src/gverify.sh +++ b/geo-replication/src/gverify.sh @@ -90,7 +90,7 @@ function slave_stats() cd $d; disk_size=$(df -P -B1 $d | tail -1 | awk "{print \$2}"); used_size=$(df -P -B1 $d | tail -1 | awk "{print \$3}"); - no_of_files=$(find $d -maxdepth 0 -empty); + no_of_files=$(find $d -maxdepth 1 -path "$d/.trashcan" -prune -o -path "$d" -o -print0 -quit); umount -l $d; rmdir $d; @@ -179,7 +179,7 @@ function main() ERRORS=$(($ERRORS + 1)); fi - if [ -z $slave_no_of_files ]; then + if [ ! -z $slave_no_of_files ]; then echo "$3::$4 is not empty. Please delete existing files in $3::$4 and retry, or use force to continue without deleting the existing files." >> $log_file; ERRORS=$(($ERRORS + 1)); fi; |