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.)
http://bugs.winehq.org/show_bug.cgi?id=23007
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Platform|All |Other OS/Version|All |other
http://bugs.winehq.org/show_bug.cgi?id=23007
--- Comment #1 from Dmitry Timoshkov dmitry@codeweavers.com 2010-06-02 09:43:38 --- Can you reproduce this with Wine's notepad?
http://bugs.winehq.org/show_bug.cgi?id=23007
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #2 from Juan Lang juan_lang@yahoo.com 2010-06-02 12:01:39 --- Confirming. Steps to reproduce:
1. Start notepad. Type "foo", then select File, Save as, type "foo.txt", click Save. Quit notepad. 2. Start notepad. Type "bar", then select File, Save as, type "foo.txt", click Save. When the "Do you want to replace it?" dialog appears, press escape. Quit notepad. 3. cat foo.txt.
Expected results: foo.txt contains "foo", from step 1. Actual results: foo.txt contains "bar".
http://bugs.winehq.org/show_bug.cgi?id=23007
--- Comment #3 from Juan Lang juan_lang@yahoo.com 2010-06-02 12:06:50 --- Patch coming in a sec.
http://bugs.winehq.org/show_bug.cgi?id=23007
--- Comment #4 from Juan Lang juan_lang@yahoo.com 2010-06-02 12:09:45 --- Patch sent: http://www.winehq.org/pipermail/wine-patches/2010-June/089201.html
http://bugs.winehq.org/show_bug.cgi?id=23007
--- Comment #5 from Juan Lang juan_lang@yahoo.com 2010-06-02 12:33:33 --- Better patch sent, fixes a similar problem when asking to create a file that doesn't yet exist: http://www.winehq.org/pipermail/wine-patches/2010-June/089202.html
http://bugs.winehq.org/show_bug.cgi?id=23007
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #6 from Juan Lang juan_lang@yahoo.com 2010-06-07 10:51:32 --- Fixed by commit 6f42f596e1f3ab185fb5639fb9d843a866db9f84.
http://bugs.winehq.org/show_bug.cgi?id=23007
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alexandre Julliard julliard@winehq.org 2010-06-11 12:53:16 --- Closing bugs fixed in 1.2-rc3.