diff --git a/usr/local/share/bastille/cp.sh b/usr/local/share/bastille/cp.sh index 0dd0b0b0..a1dc0c15 100644 --- a/usr/local/share/bastille/cp.sh +++ b/usr/local/share/bastille/cp.sh @@ -89,8 +89,9 @@ set_target "${TARGET}" for _jail in ${JAILS}; do info "[${_jail}]:" - bastille_jail_path="${bastille_jailsdir}/${_jail}/root" - if ! cp "${OPTION}" "${CPSOURCE}" "${bastille_jail_path}${CPDEST}"; then - error_continue "CP failed: ${CPSOURCE} -> ${bastille_jail_path}${CPDEST}" + host_path="${CPSOURCE}" + jail_path="$(echo ${bastille_jailsdir}/${_jail}/root/${CPDEST} | sed 's#//#/#g')" + if ! cp "${OPTION}" "${host_path}" "${jail_path}"; then + error_continue "CP failed: ${host_path} -> ${jail_path}" fi done