Commit 4e0100ff authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

comdlg32: Fix checks for failure of COMDLG32_SHGetFolderPathW in FILEDLG95_InitControls.

COMDLG32_SHGetFolderPathW returns a BOOL, not an HRESULT.
parent 03812357
...@@ -1373,9 +1373,9 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd) ...@@ -1373,9 +1373,9 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
if (handledPath == FALSE && (win2000plus || win98plus)) { if (handledPath == FALSE && (win2000plus || win98plus)) {
fodInfos->initdir = MemAlloc(MAX_PATH*sizeof(WCHAR)); fodInfos->initdir = MemAlloc(MAX_PATH*sizeof(WCHAR));
if(FAILED(COMDLG32_SHGetFolderPathW(hwnd, CSIDL_PERSONAL, 0, 0, fodInfos->initdir))) if(!COMDLG32_SHGetFolderPathW(hwnd, CSIDL_PERSONAL, 0, 0, fodInfos->initdir))
{ {
if(FAILED(COMDLG32_SHGetFolderPathW(hwnd, CSIDL_DESKTOPDIRECTORY|CSIDL_FLAG_CREATE, 0, 0, fodInfos->initdir))) if(!COMDLG32_SHGetFolderPathW(hwnd, CSIDL_DESKTOPDIRECTORY|CSIDL_FLAG_CREATE, 0, 0, fodInfos->initdir))
{ {
/* last fallback */ /* last fallback */
GetCurrentDirectoryW(MAX_PATH, fodInfos->initdir); GetCurrentDirectoryW(MAX_PATH, fodInfos->initdir);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment