mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
advapi32: Don't try to create the registry root.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
dfe65ce13e
commit
eafdbdd13b
1 changed files with 6 additions and 0 deletions
|
@ -141,10 +141,16 @@ static NTSTATUS create_key( HKEY *retkey, ACCESS_MASK access, OBJECT_ATTRIBUTES
|
|||
|
||||
if (status == STATUS_OBJECT_NAME_NOT_FOUND)
|
||||
{
|
||||
static const WCHAR registry_root[] = {'\\','R','e','g','i','s','t','r','y','\\'};
|
||||
WCHAR *buffer = attr->ObjectName->Buffer;
|
||||
DWORD attrs, pos = 0, i = 0, len = attr->ObjectName->Length / sizeof(WCHAR);
|
||||
UNICODE_STRING str;
|
||||
|
||||
/* don't try to create registry root */
|
||||
if (!attr->RootDirectory && len > sizeof(registry_root)/sizeof(WCHAR) &&
|
||||
!memicmpW( buffer, registry_root, sizeof(registry_root)/sizeof(WCHAR)))
|
||||
i += sizeof(registry_root)/sizeof(WCHAR);
|
||||
|
||||
while (i < len && buffer[i] != '\\') i++;
|
||||
if (i == len && !force_wow32) return status;
|
||||
|
||||
|
|
Loading…
Reference in a new issue