Rob Shearman : comdlg32: Fix checks for failure of COMDLG32_SHGetFolderPathW in FILEDLG95_InitControls .
Module: wine Branch: master Commit: 4e0100ff06ab27758947c17cd8480f81e42d1a70 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4e0100ff06ab27758947c17cd8... Author: Rob Shearman <rob(a)codeweavers.com> Date: Mon Feb 25 08:59:46 2008 +0000 comdlg32: Fix checks for failure of COMDLG32_SHGetFolderPathW in FILEDLG95_InitControls. COMDLG32_SHGetFolderPathW returns a BOOL, not an HRESULT. --- dlls/comdlg32/filedlg.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c index 38f95ae..13b4c79 100644 --- a/dlls/comdlg32/filedlg.c +++ b/dlls/comdlg32/filedlg.c @@ -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);
participants (1)
-
Alexandre Julliard