зеркало из https://github.com/mozilla/gecko-dev.git
back out fix for 240644, attachment save dir handling, because its claimed it causes regressions, e.g., 395053
This commit is contained in:
Родитель
49b8c27317
Коммит
80efd978f6
|
@ -141,23 +141,12 @@ NS_IMETHODIMP nsFilePicker::ShowW(PRInt16 *aReturnVal)
|
|||
NS_NAMED_LITERAL_STRING(htmExt, "html");
|
||||
nsAutoString initialDir;
|
||||
if (mDisplayDirectory)
|
||||
{
|
||||
PRBool exists;
|
||||
// checking this up front seems to behave much better than
|
||||
// just trying to open a file picker on a non-existent directory.
|
||||
mDisplayDirectory->Exists(&exists);
|
||||
if (exists)
|
||||
mDisplayDirectory->GetPath(initialDir);
|
||||
}
|
||||
mDisplayDirectory->GetPath(initialDir);
|
||||
|
||||
// If no display directory, re-use the last one.
|
||||
if(initialDir.IsEmpty()) {
|
||||
// Allocate copy of last used dir.
|
||||
initialDir = mLastUsedUnicodeDirectory;
|
||||
// defaulting to cwd instead of whatever the file picker defaults to
|
||||
// is a lot faster if that default dir doesn't exist.
|
||||
if (initialDir.IsEmpty())
|
||||
initialDir.AssignLiteral(".");
|
||||
}
|
||||
|
||||
mUnicodeFile.Truncate();
|
||||
|
|
Загрузка…
Ссылка в новой задаче