зеркало из https://github.com/mozilla/gecko-dev.git
bug 271732. Ensures that the file get dialog never returns a dereferenced shortcut. r=bryner, sr/a=dveditz
This commit is contained in:
Родитель
5b3e8c1118
Коммит
4b5a2fad7a
|
@ -233,7 +233,7 @@ NS_IMETHODIMP nsFilePicker::ShowW(PRInt16 *aReturnVal)
|
|||
result = nsToolkit::mGetOpenFileName(&ofn);
|
||||
}
|
||||
else if (mMode == modeSave) {
|
||||
ofn.Flags |= OFN_NOREADONLYRETURN;
|
||||
ofn.Flags |= OFN_NOREADONLYRETURN | OFN_NODEREFERENCELINKS;
|
||||
result = nsToolkit::mGetSaveFileName(&ofn);
|
||||
if (!result) {
|
||||
// Error, find out what kind.
|
||||
|
@ -344,6 +344,7 @@ NS_IMETHODIMP nsFilePicker::ShowW(PRInt16 *aReturnVal)
|
|||
// we must check if file already exists
|
||||
PRBool exists = PR_FALSE;
|
||||
file->Exists(&exists);
|
||||
|
||||
if (exists)
|
||||
returnOKorReplace = returnReplace;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче