Bug 665987 - Win32 nsFilePicker does not clear out mFiles. r=jmathies
authorBrian R. Bondy <netzen@gmail.com>
Fri, 19 Aug 2011 13:57:12 -0400
changeset 76887 bd9dd7e4c7ff976e31ddbd14be211219573aa2a8
parent 76886 9f28a8fec3cbd789ea67237e5780f382077967f1
child 76888 427f162c761c195d919f3a593c82bea0e4851ccf
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmathies
bugs665987
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 665987 - Win32 nsFilePicker does not clear out mFiles. r=jmathies
widget/src/windows/nsFilePicker.cpp
--- a/widget/src/windows/nsFilePicker.cpp
+++ b/widget/src/windows/nsFilePicker.cpp
@@ -356,16 +356,19 @@ NS_IMETHODIMP nsFilePicker::ShowW(PRInt1
                   MB_ICONERROR);
       result = PR_FALSE;
     }
 
     if (result) {
       // Remember what filter type the user selected
       mSelectedType = (PRInt16)ofn.nFilterIndex;
 
+      // Clear out any files from previous Show calls
+      mFiles.Clear();
+
       // Set user-selected location of file or directory
       if (mMode == modeOpenMultiple) {
         
         // from msdn.microsoft.com, "Open and Save As Dialog Boxes" section:
         // If you specify OFN_EXPLORER,
         // The directory and file name strings are NULL separated, 
         // with an extra NULL character after the last file name. 
         // This format enables the Explorer-style dialog boxes