Bug 718752 - Only apply read only checks in save mode for Vista+ file pickers. r=bbondy, a=akeybl
authorJim Mathies <jmathies@mozilla.com>
Mon, 23 Jan 2012 12:28:18 -0600
changeset 85027 8c5e5c1089dab3137fa85143b6cc4a7a80dc370f
parent 85026 0e6256e28d73be43698e651ba8280064ab33a5ff
child 85028 9b079d6b0c334f4ec0915303df1a93d7ea150e7c
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbondy, akeybl
bugs718752
milestone11.0a2
Bug 718752 - Only apply read only checks in save mode for Vista+ file pickers. r=bbondy, a=akeybl
widget/src/windows/nsFilePicker.cpp
--- a/widget/src/windows/nsFilePicker.cpp
+++ b/widget/src/windows/nsFilePicker.cpp
@@ -884,17 +884,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.
@@ -906,16 +906,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);