Bug 748865 - TB 12: Message Body not loaded when using "Fetch Headers Only" if message is in a sub-folder. r=Standard8
authorDavid Bienvenu <dbienvenu@mozilla.com>
Sat, 28 Apr 2012 14:47:07 +0100
changeset 11997 b5c4b750d403b1a697c0cf82775ad3768f2e9aa9
parent 11996 14888d952b42c7fcec2a4d7bb5e272b54c6a3280
child 11998 2b4524d258f3dc56494cb2b50f41959d370a1d79
push id599
push usermconley@mozilla.com
push dateMon, 16 Jul 2012 20:33:12 +0000
treeherdercomm-beta@c3489d5b7b65 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
bugs748865
Bug 748865 - TB 12: Message Body not loaded when using "Fetch Headers Only" if message is in a sub-folder. r=Standard8
mailnews/local/src/nsPop3Sink.cpp
--- a/mailnews/local/src/nsPop3Sink.cpp
+++ b/mailnews/local/src/nsPop3Sink.cpp
@@ -804,20 +804,21 @@ nsresult nsPop3Sink::HandleTempDownloadF
   }
   return rv;
 }
 
 
 NS_IMETHODIMP
 nsPop3Sink::IncorporateComplete(nsIMsgWindow *aMsgWindow, PRInt32 aSize)
 {
-  if (m_buildMessageUri && !m_baseMessageUri.IsEmpty())
+  if (m_buildMessageUri && !m_baseMessageUri.IsEmpty() && m_newMailParser &&
+      m_newMailParser->m_newMsgHdr)
   {
     PRUint32 msgKey;
-    m_newMailParser->GetEnvelopePos(&msgKey);
+    m_newMailParser->m_newMsgHdr->GetMessageKey(&msgKey);
     m_messageUri.Truncate();
     nsBuildLocalMessageURI(m_baseMessageUri.get(), msgKey, m_messageUri);
   }
 
   nsresult rv = WriteLineToMailbox(MSG_LINEBREAK);
   NS_ENSURE_SUCCESS(rv, rv);
   bool leaveOnServer = false;
   m_popServer->GetLeaveMessagesOnServer(&leaveOnServer);