Backed out changeset 8802479e93e7 (bug 1341211) for being a temporary fix. a=backout
authorJorg K <jorgk@jorgk.com>
Mon, 14 Aug 2017 23:21:12 +0200
changeset 29553 91182177f8e7ca2dbe7c9c83051ccfaf6d4861c9
parent 29552 3aee71e7e2001e22e79414fbf689322ef47b35c3
child 29554 36bd1eaceefb0e11a64ac72870faedabd3a88315
push id378
push userclokep@gmail.com
push dateMon, 13 Nov 2017 18:45:35 +0000
reviewersbackout
bugs1341211
backs out8802479e93e761eed1ee4497b92e22f6bb0f043b
Backed out changeset 8802479e93e7 (bug 1341211) for being a temporary fix. a=backout
mailnews/base/src/nsMessenger.cpp
--- a/mailnews/base/src/nsMessenger.cpp
+++ b/mailnews/base/src/nsMessenger.cpp
@@ -365,20 +365,17 @@ nsMessenger::PromptIfFileExists(nsIFile 
 
       nsCOMPtr <nsIFile> lastSaveDir;
       rv = GetLastSaveDirectory(getter_AddRefs(lastSaveDir));
       if (NS_SUCCEEDED(rv) && lastSaveDir) {
         filePicker->SetDisplayDirectory(lastSaveDir);
       }
 
       int16_t dialogReturn;
-      // Temporary bustage fix, see bug 1341211 - nsMessenger::PromptIfFileExists()
-      // rv = filePicker->Show(&dialogReturn);
-      dialogReturn = nsIFilePicker::returnCancel;
-      rv = NS_ERROR_FAILURE;
+      rv = filePicker->Show(&dialogReturn);
       if (NS_FAILED(rv) || dialogReturn == nsIFilePicker::returnCancel) {
         // XXX todo
         // don't overload the return value like this
         // change this function to have an out boolean
         // that we check to see if the user cancelled
         return NS_ERROR_FAILURE;
       }
 
@@ -855,20 +852,17 @@ nsMessenger::SaveOneAttachment(const cha
   }
 
   filePicker->AppendFilters(nsIFilePicker::filterAll);
 
   rv = GetLastSaveDirectory(getter_AddRefs(lastSaveDir));
   if (NS_SUCCEEDED(rv) && lastSaveDir)
     filePicker->SetDisplayDirectory(lastSaveDir);
 
-  // Temporary bustage fix, see bug 1341211 - nsMessenger::SaveOneAttachment()
-  // rv = filePicker->Show(&dialogReturn);
-  dialogResult = nsIFilePicker::returnCancel;
-  rv = NS_ERROR_FAILURE;
+  rv = filePicker->Show(&dialogResult);
   if (NS_FAILED(rv) || dialogResult == nsIFilePicker::returnCancel)
     return rv;
 
   rv = filePicker->GetFile(getter_AddRefs(localFile));
   NS_ENSURE_SUCCESS(rv, rv);
 
   SetLastSaveDirectory(localFile);
 
@@ -928,20 +922,17 @@ nsMessenger::SaveAllAttachments(uint32_t
   filePicker->Init(mWindow,
                    saveAttachmentStr,
                    nsIFilePicker::modeGetFolder);
 
   rv = GetLastSaveDirectory(getter_AddRefs(lastSaveDir));
   if (NS_SUCCEEDED(rv) && lastSaveDir)
     filePicker->SetDisplayDirectory(lastSaveDir);
 
-  // Temporary bustage fix, see bug 1341211 - nsMessenger::SaveAllAttachments()
-  // rv = filePicker->Show(&dialogReturn);
-  dialogResult = nsIFilePicker::returnCancel;
-  rv = NS_ERROR_FAILURE;
+  rv = filePicker->Show(&dialogResult);
   if (NS_FAILED(rv) || dialogResult == nsIFilePicker::returnCancel)
     return rv;
 
   rv = filePicker->GetFile(getter_AddRefs(localFile));
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = SetLastSaveDirectory(localFile);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -1254,20 +1245,17 @@ nsMessenger::GetSaveAsFile(const nsAStri
   int16_t dialogResult;
 
   nsCOMPtr <nsIFile> lastSaveDir;
   rv = GetLastSaveDirectory(getter_AddRefs(lastSaveDir));
   if (NS_SUCCEEDED(rv) && lastSaveDir)
     filePicker->SetDisplayDirectory(lastSaveDir);
 
   nsCOMPtr<nsIFile> localFile;
-  // Temporary bustage fix, see bug 1341211 - nsMessenger::GetSaveAsFile()
-  // rv = filePicker->Show(&dialogReturn);
-  dialogResult = nsIFilePicker::returnCancel;
-  rv = NS_ERROR_FAILURE;
+  rv = filePicker->Show(&dialogResult);
   NS_ENSURE_SUCCESS(rv, rv);
   if (dialogResult == nsIFilePicker::returnCancel)
   {
     // We'll indicate this by setting the outparam to null.
     *aSaveAsFile = nullptr;
     return NS_OK;
   }
 
@@ -1345,20 +1333,17 @@ nsMessenger::GetSaveToDir(nsIFile **aSav
   filePicker->Init(mWindow, chooseFolderStr, nsIFilePicker::modeGetFolder);
 
   nsCOMPtr<nsIFile> lastSaveDir;
   rv = GetLastSaveDirectory(getter_AddRefs(lastSaveDir));
   if (NS_SUCCEEDED(rv) && lastSaveDir)
     filePicker->SetDisplayDirectory(lastSaveDir);
 
   int16_t dialogResult;
-  // Temporary bustage fix, see bug 1341211 - nsMessenger::GetSaveToDir()
-  // rv = filePicker->Show(&dialogReturn);
-  dialogResult = nsIFilePicker::returnCancel;
-  rv = NS_ERROR_FAILURE;
+  rv = filePicker->Show(&dialogResult);
   if (NS_FAILED(rv) || dialogResult == nsIFilePicker::returnCancel)
   {
     // We'll indicate this by setting the outparam to null.
     *aSaveDir = nullptr;
     return NS_OK;
   }
 
   nsCOMPtr<nsIFile> dir;