Commit 7ce76466 authored by Fabrice Ménard's avatar Fabrice Ménard Committed by Alexandre Julliard

Check the type of error returned by SHCreateDirectoryExW.

parent 30782221
......@@ -1573,6 +1573,7 @@ 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);
......@@ -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;
......
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