fix: ensure a trailing slash in log dir name

LOGDIR="/foo/bar" (without  a trailing slash) produces /foo/barbackup.lock and/foo/barduplicity-* files, not /foo/bar/backup.lock and /foo/bar/duplicity-* files as expected. This fix ensures a trailing slash in the log dir name.
This commit is contained in:
martinec 2014-08-10 03:08:38 +02:00
parent 4b640db241
commit 7b20db3953

View file

@ -177,6 +177,9 @@ if [[ -n "$FTP_PASSWORD" ]]; then
export FTP_PASSWORD
fi
# Ensure a trailing slash always exists in the log directory name
LOGDIR="${LOGDIR%/}/"
LOGFILE="${LOGDIR}${LOG_FILE}"
DUPLICITY="$(which duplicity)"