Fix check for empty datapath

This commit is contained in:
Rob Pearce 2019-03-14 12:25:23 +11:00
parent 5fb9996d6e
commit 66b3c450b0
1 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ RCLONE=/usr/local/bin/rclone
SPEED=""
CRONMODE=0
CONNECTIONS=32
CONNECTIONS=20
LOG=/dev/stdout
DATE=/bin/date
DOALL=0
@ -223,8 +223,8 @@ for f in $REPOSTOBACKUP; do
exit 1
fi
count=`find ${DATAPATH} -type f | wc -l`
if [ $count -le 1 ]; then
count=`ls ${DATAPATH} | wc -l`
if [ $count -le 2 ]; then
log "Error: ${DATAPATH} exists but appears to be empty"
exit 1
fi