server: Only require REG_OPTION_VOLATILE when creating a new key.

This commit is contained in:
Alexandre Julliard 2009-11-20 11:39:55 +01:00
parent 9adbd8ab21
commit 72ba00fffe
1 changed files with 5 additions and 5 deletions

View File

@ -612,11 +612,6 @@ static struct key *create_key( struct key *key, const struct unicode_str *name,
set_error( STATUS_KEY_DELETED );
return NULL;
}
if (!(flags & KEY_VOLATILE) && (key->flags & KEY_VOLATILE))
{
set_error( STATUS_CHILD_MUST_BE_VOLATILE );
return NULL;
}
token.str = NULL;
if (!get_path_token( name, &token )) return NULL;
@ -632,6 +627,11 @@ static struct key *create_key( struct key *key, const struct unicode_str *name,
/* create the remaining part */
if (!token.len) goto done;
if (!(flags & KEY_VOLATILE) && (key->flags & KEY_VOLATILE))
{
set_error( STATUS_CHILD_MUST_BE_VOLATILE );
return NULL;
}
*created = 1;
if (flags & KEY_DIRTY) make_dirty( key );
if (!(key = alloc_subkey( key, &token, index, modif ))) return NULL;