https://bugs.winehq.org/show_bug.cgi?id=42469
Bug ID: 42469 Summary: GetOpenFileName should expand environment variables in lpstrInitialDir Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: comdlg32 Assignee: wine-bugs@winehq.org Reporter: kamil.hornicek@reactos.org Distribution: ---
Created attachment 57319 --> https://bugs.winehq.org/attachment.cgi?id=57319 testcase
When passing an environment variables such as %programfiles% to GetOpenFileName via lpstrInitialDir these get expanded in Windows 2000 / XP but not in Wine, where it fails the PathFileExistsW check in filedlg on line 1598 and is later set to null. I checked and the orignial dll imports ExpandEnvironmentStrings.
Attaching a minimal testcase and a possible solution.