Bug 661991 - follow up, make sure and clear file lists before calling file picker's Show. r=bbondy.

This commit is contained in:
Jim Mathies 2011-12-16 09:10:16 -06:00
Родитель 745ddccdbe
Коммит 7135ff9bf5
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -813,9 +813,6 @@ nsFilePicker::ShowXPFilePicker(const nsString& aInitialDir)
return true;
}
// Clear previous file selection list
mFiles.Clear();
// Set user-selected location of file or directory. From msdn's "Open and
// Save As Dialog Boxes" section:
// If you specify OFN_EXPLORER, the directory and file name strings are NULL
@ -1040,7 +1037,9 @@ nsFilePicker::ShowW(PRInt16 *aReturnVal)
initialDir = mLastUsedUnicodeDirectory;
}
// Clear previous file selections
mUnicodeFile.Truncate();
mFiles.Clear();
bool result = false;
if (mMode == modeGetFolder) {