[WINESYNC] reg: Support use of registry views when deleting registry keys.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 31f070f7d3e312942d72e774a4a7dbd21b655a31 by Hugh McMaster <hugh.mcmaster@outlook.com>
This commit is contained in:
winesync 2022-01-17 18:47:36 +01:00 committed by Thomas Csovcsity
parent fde082ff99
commit 129ed8f5fb
3 changed files with 27 additions and 23 deletions

View file

@ -59,25 +59,29 @@ static int run_delete(HKEY root, WCHAR *path, REGSAM sam, WCHAR *key_name, WCHAR
}
}
/* Delete registry key if no /v* option is given */
if (!value_name && !value_empty && !value_all)
{
if ((rc = RegDeleteTreeW(root, path)))
{
output_error(rc);
return 1;
}
output_message(STRING_SUCCESS);
return 0;
}
if ((rc = RegOpenKeyExW(root, path, 0, KEY_READ|KEY_SET_VALUE|sam, &hkey)))
{
output_error(rc);
return 1;
}
/* Delete registry key if no /v* option is given */
if (!value_name && !value_empty && !value_all)
{
if ((rc = RegDeleteTreeW(hkey, NULL)))
{
RegCloseKey(hkey);
output_error(rc);
return 1;
}
RegDeleteKeyW(hkey, L"");
RegCloseKey(hkey);
output_message(STRING_SUCCESS);
return 0;
}
op_delete_key = FALSE;
if (value_all)