Fix check for empty datapath
This commit is contained in:
parent
5fb9996d6e
commit
66b3c450b0
6
bare.sh
6
bare.sh
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue