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

New commits:
commit 1d00416c04921d0d3182d8d59113db6f4bbbf116
Author:     Vasily Melenchuk <vasily.melenc...@cib.de>
AuthorDate: Tue Jul 26 20:41:34 2022 +0300
Commit:     Vasily Melenchuk <vasily.melenc...@cib.de>
CommitDate: Thu Jul 28 10:03:58 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>
    (cherry picked from commit 772f7a2dc3508bdebb53b6de4a43685d517cf1ef)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137514
    Tested-by: Vasily Melenchuk <vasily.melenc...@cib.de>
    Reviewed-by: Vasily Melenchuk <vasily.melenc...@cib.de>

diff --git a/shell/source/win32/simplemail/smplmailclient.cxx 
b/shell/source/win32/simplemail/smplmailclient.cxx
index ff4b7443ef73..254de4bb49a0 100644
--- a/shell/source/win32/simplemail/smplmailclient.cxx
+++ b/shell/source/win32/simplemail/smplmailclient.cxx
@@ -214,7 +214,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