comdlg32: Fix checks for failure of COMDLG32_SHGetFolderPathW in FILEDLG95_InitControls.

COMDLG32_SHGetFolderPathW returns a BOOL, not an HRESULT.
This commit is contained in:
Rob Shearman 2008-02-25 08:59:46 +00:00 committed by Alexandre Julliard
parent 03812357db
commit 4e0100ff06
1 changed files with 2 additions and 2 deletions

View File

@ -1373,9 +1373,9 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
if (handledPath == FALSE && (win2000plus || win98plus)) {
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 */
GetCurrentDirectoryW(MAX_PATH, fodInfos->initdir);