From b7b1c97bb2d783ac97812dc81e6eaba51f7a920f Mon Sep 17 00:00:00 2001 From: "bienvenu%nventure.com" Date: Thu, 30 Sep 2004 16:36:47 +0000 Subject: [PATCH] fix problem sending .doc files when apple double has been associated with .doc files on non-mac, sr=mscott 236239 --- mailnews/compose/src/nsMsgAttachmentHandler.cpp | 3 +++ mailnews/compose/src/nsMsgSend.cpp | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mailnews/compose/src/nsMsgAttachmentHandler.cpp b/mailnews/compose/src/nsMsgAttachmentHandler.cpp index f03e0928350..9a3a33ada77 100644 --- a/mailnews/compose/src/nsMsgAttachmentHandler.cpp +++ b/mailnews/compose/src/nsMsgAttachmentHandler.cpp @@ -465,6 +465,9 @@ FetcherURLDoneCallback(nsresult aStatus, #if defined(XP_MAC) || defined(XP_MACOSX) //Do not change the type if we are dealing with an apple double file if (!ma->mAppleFileSpec) +#else + // can't send appledouble on non-macs + if (strcmp(aContentType, "multipart/appledouble")) #endif { PR_FREEIF(ma->m_type); diff --git a/mailnews/compose/src/nsMsgSend.cpp b/mailnews/compose/src/nsMsgSend.cpp index 7657f38c8e6..e3cf1fec7a6 100644 --- a/mailnews/compose/src/nsMsgSend.cpp +++ b/mailnews/compose/src/nsMsgSend.cpp @@ -103,7 +103,6 @@ #include "nsNetCID.h" #include "nsNetError.h" #include "nsMsgUtils.h" -#include "nsIRDFService.h" #include "nsIMsgMdnGenerator.h" #include "nsISmtpServer.h" #include "nsIMsgCompose.h" @@ -2319,6 +2318,9 @@ nsMsgComposeAndSend::AddCompFieldLocalAttachments() if (NS_SUCCEEDED(rv) && !fileExt.IsEmpty()) { nsCAutoString type; mimeFinder->GetTypeFromExtension(fileExt, type); +#if !defined(XP_MAC) && !defined(XP_MACOSX) + if (!type.Equals("multipart/appledouble")) // can't do apple double on non-macs +#endif m_attachments[newLoc].m_type = ToNewCString(type); } } @@ -2333,6 +2335,9 @@ nsMsgComposeAndSend::AddCompFieldLocalAttachments() if (NS_SUCCEEDED(rv) && !fileExt.IsEmpty()) { nsCAutoString type; mimeFinder->GetTypeFromExtension(fileExt, type); +#if !defined(XP_MAC) && !defined(XP_MACOSX) + if (!type.Equals("multipart/appledouble")) // can't do apple double on non-macs +#endif m_attachments[newLoc].m_type = ToNewCString(type); } }