mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 09:50:07 +00:00
[SHELL32] - Don't fail if Shell folder cannot be created. This way shell registers more folders on LiveCD.
svn path=/trunk/; revision=54523
This commit is contained in:
parent
5ea66e831b
commit
5031e72c6a
|
@ -1563,13 +1563,15 @@ static HRESULT _SHRegisterFolders(HKEY hRootKey, HANDLE hToken,
|
|||
hr = HRESULT_FROM_WIN32(ret);
|
||||
else
|
||||
{
|
||||
hr = SHGetFolderPathW(NULL, folders[i] | CSIDL_FLAG_CREATE,
|
||||
hToken, SHGFP_TYPE_DEFAULT, path);
|
||||
ret = RegSetValueExW(hKey,
|
||||
CSIDL_Data[folders[i]].szValueName, 0, REG_SZ,
|
||||
(LPBYTE)path, (wcslen(path) + 1) * sizeof(WCHAR));
|
||||
if (ret)
|
||||
hr = HRESULT_FROM_WIN32(ret);
|
||||
// Don't fail if folder can't be created
|
||||
if (SUCCEEDED(SHGetFolderPathW(NULL, folders[i] | CSIDL_FLAG_CREATE,
|
||||
hToken, SHGFP_TYPE_DEFAULT, path)))
|
||||
{
|
||||
ret = RegSetValueExW(hKey, CSIDL_Data[folders[i]].szValueName, 0, REG_SZ,
|
||||
(LPBYTE)path, (wcslen(path) + 1) * sizeof(WCHAR));
|
||||
if (ret)
|
||||
hr = HRESULT_FROM_WIN32(ret);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue