Bug 748865 - TB 12: Message Body not loaded when using "Fetch Headers Only" if message is in a sub-folder. r+a=Standard8
authorDavid Bienvenu <dbienvenu@mozilla.com>
Sat, 28 Apr 2012 14:47:07 +0100
changeset 30780 401204ffd88603efa3c1504e69fa2ff8a737cbb8
parent 30779 fc4c8114809d00e9dfd33679d6e1a4814e9e37bb
child 30781 53fd7df65dba2ba87e82a9821da23500a98edfb8
push id1
push userclokep@gmail.com
push dateMon, 07 May 2018 22:45:56 +0000
treeherdercomm-esr60@57eacde5ef40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs748865
Bug 748865 - TB 12: Message Body not loaded when using "Fetch Headers Only" if message is in a sub-folder. r+a=Standard8
mailnews/local/src/nsPop3Sink.cpp
--- a/mailnews/local/src/nsPop3Sink.cpp
+++ b/mailnews/local/src/nsPop3Sink.cpp
@@ -802,20 +802,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);