Closed Bug 675025 Opened 13 years ago Closed 1 month ago

nsHeaderSniffer::PerformSave's filename validation escapes Cocoa's overwrite warning

Categories

(Camino Graveyard :: General, defect)

1.9.2 Branch
All
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: alqahira, Unassigned)

Details

Because we munge filenames "post-Panel" in nsHeaderSniffer::PerformSave (to ensure Gecko doesn't croak on them when it does the actual saving if a default name or user-entered name has invalid characters), we allow users to save something with the same name as an existing file with no warning (because Cocoa seems to check against the current text field contents, [NSSavePanel filename]).

There's no access to set the filename in the text field prior to 10.6 (where's there |setNameFieldStringValue:|); it's possible we could use something like the (deprecated-in-10.6) |panel:isValidFilename:| to do validation now, but that method seems like it still requires the user to fix the filename rather than letting us fix it automatically.
On a related note, folder name collisions for HTML Complete also aren't detected at save time (although now, post-bug 663030, we do show a useful error message from the Downloads window for some types of HTML Complete folder name collisions).
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.