shell32: Always create default known folder directories.

Some applications query for the default path, but this would fail on
older prefixes where the new default path was never created.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Andrew Eikum 2021-06-17 10:43:01 -05:00 committed by Alexandre Julliard
parent 24d0d6f524
commit 978e03ea94
1 changed files with 7 additions and 0 deletions

View File

@ -4688,6 +4688,13 @@ static HRESULT _SHRegisterFolders(HKEY hRootKey, HANDLE hToken,
}
}
}
else
{
/* create the default dir, which may be different from the path
* stored in the registry. */
SHGetFolderPathW(NULL, folders[i] | CSIDL_FLAG_CREATE,
hToken, SHGFP_TYPE_DEFAULT, path);
}
}
if (hUserKey)
RegCloseKey(hUserKey);