Bug 718752 - Only apply read only checks in save mode for Vista+ file pickers. r=bbondy
authorJim Mathies <jmathies@mozilla.com>
Wed, 18 Jan 2012 07:31:09 -0600
changeset 86020 0e424ab9ddffd0139948d2da13e977321d41b2e9
parent 86019 d2f36b2d2c3bc1f4fa87dc07d4e499340d5671ab
child 86021 944637ae3a9b2dbf7225fa6be91ac2ecfd132096
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbondy
bugs718752
milestone12.0a1
Bug 718752 - Only apply read only checks in save mode for Vista+ file pickers. r=bbondy
widget/windows/nsFilePicker.cpp
--- a/widget/windows/nsFilePicker.cpp
+++ b/widget/windows/nsFilePicker.cpp
@@ -888,17 +888,17 @@ nsFilePicker::ShowFilePicker(const nsStr
 
   // hook up event callbacks
   dialog->Advise(this, &mFDECookie);
 
   // options
 
   FILEOPENDIALOGOPTIONS fos = 0;
   fos |= FOS_SHAREAWARE | FOS_OVERWRITEPROMPT |
-         FOS_NOREADONLYRETURN | FOS_FORCEFILESYSTEM;
+         FOS_FORCEFILESYSTEM;
 
   // Handle add to recent docs settings
   if (IsPrivacyModeEnabled() || !mAddToRecentDocs) {
     fos |= FOS_DONTADDTORECENT;
   }
 
   // Msdn claims FOS_NOCHANGEDIR is not needed. We'll add this
   // just in case.
@@ -910,16 +910,17 @@ nsFilePicker::ShowFilePicker(const nsStr
       fos |= FOS_FILEMUSTEXIST;
       break;
 
     case modeOpenMultiple:
       fos |= FOS_FILEMUSTEXIST | FOS_ALLOWMULTISELECT;
       break;
 
     case modeSave:
+      fos |= FOS_NOREADONLYRETURN;
       // Don't follow shortcuts when saving a shortcut, this can be used
       // to trick users (bug 271732)
       if (IsDefaultPathLink())
         fos |= FOS_NODEREFERENCELINKS;
       break;
   }
 
   dialog->SetOptions(fos);