FileChooser::browserForFileToSave() bug


#1

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?


#2

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


#3

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


#4

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…


#5

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.

HTH


#6

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.


#7

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


#8

kNavDontConfirmReplacement should help


#9

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