1
0
Fork 0

putwww: fix filename quoting

This commit is contained in:
tastytea 2023-11-12 22:06:42 +01:00
parent 2d2ec24d28
commit 21ff36312e
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 4 additions and 4 deletions

View File

@ -13,16 +13,16 @@ if [[ ${#o_help} -ne 0 || ! -v 1 ]]; then
return ${ret}
fi
local dir=""
[[ -n ${o_dir[2]} ]] && dir=${o_dir[2]}/
[[ -n ${o_dir[2]} ]] && dir=${(q)o_dir[2]}/
local -a putcmds
for file in "${@}"; do
putcmds+="put ${file}"
for file in ${@}; do
putcmds+="put ${(q)file}"
done
sftp tastytea.de <<EOF
cd /var/www/tastytea.de/files/${dir}
$(print -l ${putcmds})
$(print -l ${(q)putcmds})
EOF
for file in "${@}"; do