diff --git a/widget/src/windows/nsFilePicker.cpp b/widget/src/windows/nsFilePicker.cpp index 3af672fc6ea0..9c6c72c2b220 100644 --- a/widget/src/windows/nsFilePicker.cpp +++ b/widget/src/windows/nsFilePicker.cpp @@ -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; }