Confirming the replacement of a file in save dialog

Currently the save dialog does not ask whether to replace a existing file or no…
So for that On Mac, juce_mac_FileChooser.cpp, On line 190,

        options.optionFlags |= kNavSelectDefaultLocation
                            //    | kNavDontConfirmReplacement
                                | kNavSupportPackages
                                | kNavAllowPreviews;

I just commented kNavDontConfirmReplacement.

Similarly on Win, juce_win32_FileChooser.cpp, On line 340,

 of.Flags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_NOCHANGEDIR | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT

I added OFN_OVERWRITEPROMPT flag

It works fine, atleast I did not find any problems.

But Jules, can you comment on this, is it ok if I make these above code changes?

Well I wouldn’t want to make this a default behaviour, as it’s already handled separately in things like the FileBasedDocument, but I guess since you’ve got code for both platforms there, there’s no reason for me not to add it as an option - thanks!