diff options
author | Brian Smith <brian@dbsoft.org> | 2022-04-26 10:13:11 -0500 |
---|---|---|
committer | Brian Smith <brian@dbsoft.org> | 2022-04-26 10:19:04 -0500 |
commit | 3daf711085889bad1bd68651bc4e8790412ae105 (patch) | |
tree | f5b0e4c1befb320cdf158e1839ac5e273373087f /mailnews/base/src/nsMessenger.cpp | |
parent | 7fe702603066e7f122d5dd66a3a1892ac7e06215 (diff) | |
download | uxp-3daf711085889bad1bd68651bc4e8790412ae105.tar.gz |
Issue #1829 - Revert “Issue #1751 -- Remove XP_MACOSX conditionals from the rest of the tree.”
This also removes some PP abuse and takes file entries out of PP when no longer
needed without XP_MACOSX conditionals.
This reverts commit 6f707bde95dab6998ac204f9ee6c925ee230c740.
Diffstat (limited to 'mailnews/base/src/nsMessenger.cpp')
-rw-r--r-- | mailnews/base/src/nsMessenger.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mailnews/base/src/nsMessenger.cpp b/mailnews/base/src/nsMessenger.cpp index 8719530f79..953b462b6a 100644 --- a/mailnews/base/src/nsMessenger.cpp +++ b/mailnews/base/src/nsMessenger.cpp @@ -698,6 +698,7 @@ nsresult nsMessenger::SaveAttachment(nsIFile *aFile, saveListener->QueryInterface(NS_GET_IID(nsIStreamListener), getter_AddRefs(convertedListener)); +#ifndef XP_MACOSX // if the content type is bin hex we are going to do a hokey hack and make sure we decode the bin hex // when saving an attachment to disk.. if (MsgLowerCaseEqualsLiteral(aContentType, APPLICATION_BINHEX)) @@ -712,6 +713,7 @@ nsresult nsMessenger::SaveAttachment(nsIFile *aFile, channelSupport, getter_AddRefs(convertedListener)); } +#endif nsCOMPtr<nsIURI> dummyNull; if (fetchService) rv = fetchService->FetchMimePart(URL, fullMessageUri.get(), @@ -769,6 +771,10 @@ nsMessenger::SaveAttachmentToFolder(const nsACString& contentType, const nsACStr ConvertAndSanitizeFileName(PromiseFlatCString(displayName).get(), unescapedFileName); rv = attachmentDestination->Append(unescapedFileName); NS_ENSURE_SUCCESS(rv, rv); +#ifdef XP_MACOSX + rv = attachmentDestination->CreateUnique(nsIFile::NORMAL_FILE_TYPE, ATTACHMENT_PERMISSION); + NS_ENSURE_SUCCESS(rv, rv); +#endif rv = SaveAttachment(attachmentDestination, url, messageUri, contentType, nullptr, nullptr); attachmentDestination.swap(*aOutFile); |