[Bug 47054] New: SHCreateDirectory/ SHCreateDirectoryEx error result incorrect when hwnd is not NULL and directory already exists
https://bugs.winehq.org/show_bug.cgi?id=47054 Bug ID: 47054 Summary: SHCreateDirectory/SHCreateDirectoryEx error result incorrect when hwnd is not NULL and directory already exists Product: Wine Version: 4.6 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: shell32 Assignee: wine-bugs(a)winehq.org Reporter: ubuntor2000(a)gmail.com Distribution: --- Created attachment 64221 --> https://bugs.winehq.org/attachment.cgi?id=64221 Test case (source) When SHCreateDirectory/SHCreateDirectoryEx is called with a non-NULL hwnd and a path to a directory that already exists, Wine returns 1223 (ERROR_CANCELLED) instead of 183 (ERROR_ALREADY_EXISTS). This is being set in https://source.winehq.org/git/wine.git/blob/fabde842ede40fc53cf6f5743d5b4778... According to the MSDN (https://docs.microsoft.com/en-us/windows/desktop/api/shlobj_core/nf-shlobj_c...): it seems that ERROR_CANCELLED should only be returned in special cases, independent of whether hwnd is NULL or not. This may also affect other error conditions. Windows XP (VM) test case output (no warning messagebox is created): SHCreateDirectory, NULL hwnd: 183 SHCreateDirectory, actual hwnd: 183 SHCreateDirectoryExW, NULL hwnd: 183 SHCreateDirectoryExW, actual hwnd: 183 Wine test case output: SHCreateDirectory, NULL hwnd: 183 0009:fixme:shell:SHCreateDirectoryExW Show system error message, creating path L"C:\\Windows\\Temp\\test", failed with error 183 SHCreateDirectory, actual hwnd: 1223 SHCreateDirectoryExW, NULL hwnd: 183 0009:fixme:shell:SHCreateDirectoryExW Show system error message, creating path L"C:\\Windows\\Temp\\test", failed with error 183 SHCreateDirectoryExW, actual hwnd: 1223 This affects Atelier Lydie and Suelle: saving doesn't work when the SAVEDATA directory already exists. This probably happens since the game is checking if SHCreateDirectoryExW succeeds or returns ERROR_ALREADY_EXISTS, as manually patching shell32.dll.so to skip the FIXME section fixes the issue. Associated Proton issue: https://github.com/ValveSoftware/Proton/issues/2452 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=47054 ubuntor2000(a)gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|UNCONFIRMED |RESOLVED --- Comment #1 from ubuntor2000(a)gmail.com --- Ack, dup of 47023. *** This bug has been marked as a duplicate of bug 47023 *** -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=47054 Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #2 from Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- Closing Duplicate. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org