Fix path with spaces in eval

This commit is contained in:
Darko Poljak 2019-11-15 08:29:21 +01:00
parent f818f011e3
commit 401dd4fa8e
1 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ lock_flock()
# $1 = source to backup
# shellcheck disable=SC2059
lockfile="${LOCKDIR}/$(printf "${LOCKFILE_PATTERN}" "$1")"
eval "exec ${LOCKFD}> ${lockfile}"
eval "exec ${LOCKFD}> '${lockfile}'"
flock -n ${LOCKFD} && return 0 || return 1
}
@ -469,7 +469,7 @@ fi
if [ "${PARALLEL}" ]; then
mkfifo "${CONTROL_PIPE}"
# fd 5 is tied to control pipe
eval "exec 5<>${CONTROL_PIPE}"
eval "exec 5<>'${CONTROL_PIPE}'"
TRAPFUNC="${TRAPFUNC}; rm -f \"${CONTROL_PIPE}\""
# shellcheck disable=SC2064
trap "${TRAPFUNC}" 0 1 2 15