Skip to content

Commit

Permalink
cp: trim double // to /
Browse files Browse the repository at this point in the history
  • Loading branch information
tschettervictor authored Jan 12, 2025
1 parent c67ab18 commit 816f243
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions usr/local/share/bastille/cp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 816f243

Please sign in to comment.