senddoc: pass the mail client its arguments directly
so the generic-mailto and xdg-email branch calls the mail client with each attachment path as one argument, as the other branches already do Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com> Change-Id: Id3fba77ebcb7bb10ef6116c311390a0bdeb412ce Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12783 Tested-by: Jenkins CPCI <releng@collaboraoffice.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.com> Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/12845 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 0d6a67a081caf933eedb28701079f6576aa3700f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211798 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
committed by
Xisco Fauli
parent
24571d3635
commit
194c8298c4
@@ -277,7 +277,11 @@ case $MAILER_TYPE in
|
|||||||
|
|
||||||
generic-mailto | xdg-email)
|
generic-mailto | xdg-email)
|
||||||
|
|
||||||
while [ "$1" != "" ]; do
|
# The loop shifts options off the front of "$@" while the mail client's arguments are
|
||||||
|
# appended to the back. The marker separates the two.
|
||||||
|
set -- "$@" "--end-of-arguments"
|
||||||
|
|
||||||
|
while [ "$1" != "--end-of-arguments" ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
--to)
|
--to)
|
||||||
if [ "${TO}" != "" ]; then
|
if [ "${TO}" != "" ]; then
|
||||||
@@ -309,7 +313,7 @@ case $MAILER_TYPE in
|
|||||||
MAILTO="${MAILTO:+${MAILTO}&}attach=${ATTACH_URL}&attachment=${ATTACH_URL}"
|
MAILTO="${MAILTO:+${MAILTO}&}attach=${ATTACH_URL}&attachment=${ATTACH_URL}"
|
||||||
if [ "$MAILER_TYPE" = "xdg-email" ]; then
|
if [ "$MAILER_TYPE" = "xdg-email" ]; then
|
||||||
# Also add the argument: see https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/177
|
# Also add the argument: see https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/177
|
||||||
ATTACH="${ATTACH:+${ATTACH} }--attach \"$2\""
|
set -- "$@" --attach "$2"
|
||||||
fi
|
fi
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
@@ -318,9 +322,10 @@ case $MAILER_TYPE in
|
|||||||
esac
|
esac
|
||||||
shift;
|
shift;
|
||||||
done
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
MAILTO="mailto:${TO}?${MAILTO}"
|
MAILTO="mailto:${TO}?${MAILTO}"
|
||||||
eval "${MAILER} ${ATTACH} \"${MAILTO}\"" &
|
${MAILER} "$@" "${MAILTO}" &
|
||||||
;;
|
;;
|
||||||
|
|
||||||
dtmail)
|
dtmail)
|
||||||
|
|||||||
Reference in New Issue
Block a user