shell/source/win32/simplemail/smplmailclient.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 772f7a2dc3508bdebb53b6de4a43685d517cf1ef
Author:     Vasily Melenchuk <vasily.melenc...@cib.de>
AuthorDate: Tue Jul 26 20:41:34 2022 +0300
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Wed Jul 27 14:27:03 2022 +0200

    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 <kelem...@ubuntu.com>
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>

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;

Reply via email to