Fix Win10's GetUserProfileDirectory() problem in stable-2.0 branch.
This commit is contained in:
parent
8d62a2c7e1
commit
4344c4fd60
|
@ -451,7 +451,6 @@ static int determineUserDir(void)
|
|||
if (OpenProcessToken(processHandle, TOKEN_QUERY, &accessToken))
|
||||
{
|
||||
DWORD psize = 0;
|
||||
WCHAR dummy = 0;
|
||||
LPWSTR wstr = NULL;
|
||||
BOOL rc = 0;
|
||||
|
||||
|
@ -460,7 +459,7 @@ static int determineUserDir(void)
|
|||
* psize. Also note that the second parameter can't be
|
||||
* NULL or the function fails.
|
||||
*/
|
||||
rc = pGetUserProfileDirectoryW(accessToken, &dummy, &psize);
|
||||
rc = pGetUserProfileDirectoryW(accessToken, NULL, &psize);
|
||||
assert(!rc); /* !!! FIXME: handle this gracefully. */
|
||||
(void)rc;
|
||||
|
||||
|
|
Loading…
Reference in New Issue