summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2022-07-26 20:41:34 +0300
committerThorsten Behrens <thorsten.behrens@allotropia.de>2022-07-27 14:27:03 +0200
commit772f7a2dc3508bdebb53b6de4a43685d517cf1ef (patch)
tree329ae98c00816eb8fd5dbb3ce6ca3f38afd1b7e5
parentc4f7043c593823b8c5605e779371ff430659eb20 (diff)
tdf#150161: senddoc: use corrected name url: original can be a file path
...and in this case file name will be not parsed and --attach-name parameter will be empty. This leads to missing file name of attachment. In case of Thunderbird it is not a big problem, but Outlook does not want to attach .tmp files: it is "potentially unsafe attachment". Change-Id: I7c2f696391e1183211a169b08004c6668771f288 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137480 Tested-by: Gabor Kelemen <kelemeng@ubuntu.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
-rw-r--r--shell/source/win32/simplemail/smplmailclient.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/source/win32/simplemail/smplmailclient.cxx b/shell/source/win32/simplemail/smplmailclient.cxx
index 075eaa34579d..8e85ca0868ee 100644
--- a/shell/source/win32/simplemail/smplmailclient.cxx
+++ b/shell/source/win32/simplemail/smplmailclient.cxx
@@ -201,7 +201,7 @@ OUString CSmplMailClient::CopyAttachment(const OUString& sOrigAttachURL, OUStrin
osl::FileBase::getFileURLFromSystemPath(sCorrectedOrigAttachURL, sCorrectedOrigAttachURL);
if (osl::File::copy(sCorrectedOrigAttachURL, sNewAttachmentURL) == osl::FileBase::RC::E_None)
{
- INetURLObject url(sOrigAttachURL, INetURLObject::EncodeMechanism::WasEncoded);
+ INetURLObject url(sCorrectedOrigAttachURL, INetURLObject::EncodeMechanism::WasEncoded);
sUserVisibleName = url.getName(INetURLObject::LAST_SEGMENT, true,
INetURLObject::DecodeMechanism::WithCharset);
nodelete = false;