fix bug 731907, regression in handling cancelling of msgs with attachments, r=bienvenu
authorHiro <hiikezoe@mozilla-japan.org>
Thu, 01 Mar 2012 16:45:26 -0800
changeset 10976 9fb387de35bd09eb06e66fad547199da75080806
parent 10975 6c1d591441581464d49cf346b76d8c70e04c6a95
child 10977 8eca2a2319d86e4909b51f84d06669c6ccc4e61d
push id463
push userbugzilla@standard8.plus.com
push dateTue, 24 Apr 2012 17:34:51 +0000
treeherdercomm-beta@e53588e8f7b0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbienvenu
bugs731907
fix bug 731907, regression in handling cancelling of msgs with attachments, r=bienvenu
mailnews/compose/src/nsMsgAttachmentHandler.cpp
--- a/mailnews/compose/src/nsMsgAttachmentHandler.cpp
+++ b/mailnews/compose/src/nsMsgAttachmentHandler.cpp
@@ -990,17 +990,18 @@ nsMsgAttachmentHandler::LoadDataFromFile
 nsresult
 nsMsgAttachmentHandler::Abort()
 {
   nsCOMPtr<nsIRequest> saveRequest;
   saveRequest.swap(mRequest);
 
   if (mTmpFile)
   {
-    mTmpFile->Remove(false);
+    if (mDeleteFile)
+      mTmpFile->Remove(false);
     mTmpFile = nsnull;
   }
 
   NS_ASSERTION(m_mime_delivery_state != nsnull, "not-null m_mime_delivery_state");
 
   if (m_done)
     return NS_OK;