FileChooser::browserForFileToSave() bug


When I select a file to overwrite by clicking on it and then clicking SAVE, the FileChooser will ask me if I want to overwrite the file, which is correct.
But if I just enter the name of a file that’s already existing and then click SAVE, the FileChooser will not warn me that this file is already existing.
I guess this is a bug?


Which OS are you using? And did you definitely set warnAboutOverwritingExistingFiles to true?


Yes, I set warnAboutOverwritingExistingFiles to true.
The problem is the same in Windows and OS X.


ok… well I guess it’s just the way the platforms work. In neither case is it something that there’s any control over.

I guess they must assume that if you type it then you’re explicit about the decision to save that file…


If I remember correctly it’s more a matter of the text you’ve type do not contains the extension.
If you type the full name with extension, you’ll get the warning at least on mac.



I suppose you could simply opt not to use the OS’es facility to confirm overwrite and deal with it in an application dialog.

Could be done fairly easy in the FileChooser component, I suppose.


True, though on the mac I’m not sure if it actually lets you disable that overwrite warning…


kNavDontConfirmReplacement should help


not in my new Cocoa version, it won’t!