From 7ce764669e354a0acbce497f26934998409571bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20M=C3=A9nard?= Date: Tue, 2 Nov 2004 05:22:39 +0000 Subject: [PATCH] Check the type of error returned by SHCreateDirectoryExW. --- dlls/shell32/shellpath.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 1aaedb8e829..72b220a641a 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -1573,7 +1573,8 @@ HRESULT WINAPI SHGetFolderPathW( WCHAR szBuildPath[MAX_PATH], szTemp[MAX_PATH]; DWORD folder = nFolder & CSIDL_FOLDER_MASK; CSIDL_Type type; - + int ret; + TRACE("%p,%p,nFolder=0x%04x\n", hwndOwner,pszPath,nFolder); /* Windows always NULL-terminates the resulting path regardless of success @@ -1656,7 +1657,8 @@ HRESULT WINAPI SHGetFolderPathW( } /* create directory/directories */ - if (SHCreateDirectoryExW(hwndOwner, szBuildPath, NULL)) + ret = SHCreateDirectoryExW(hwndOwner, szBuildPath, NULL); + if (ret && ret != ERROR_ALREADY_EXISTS) { ERR("Failed to create directory '%s'.\n", debugstr_w(szBuildPath)); hr = E_FAIL;