http://bugs.winehq.org/show_bug.cgi?id=23007
Summary: GetSaveFileName incorrectly returns non-zero when Escape is pressed after a "replace this file" dialog Product: Wine Version: 1.2-rc2 Platform: All OS/Version: All Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: silas-wine@flatline.org.uk
The Windows API GetSaveFileName function should return 0 if the user cancels the action in any way. Unfortunately, if you type an existing filename into the box and press Enter, and when you are asked if you want to replace the file or not, you press Escape, then GetSaveFileName will return the value 1 which will cause the Windows application to behave as if you had answered YES to replacing the file.
Since pressing Escape can often be thought of as "get me out of here" (i.e. answer NO), this is a bad thing. (I'm told that the "do you want to replace" dialog in real Windows does not respond to the Escape key at all.)