[WINESYNC] reg: Support recursion in the 'copy' command.

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

wine commit id 8d9a228e99e1252a0d82c88e6a64635548c478a6 by Hugh McMaster <hugh.mcmaster@outlook.com>
This commit is contained in:
winesync 2022-01-17 18:43:11 +01:00 committed by Thomas Csovcsity
parent da2d23fb94
commit ded0675d66
3 changed files with 22 additions and 3 deletions

View file

@ -90,6 +90,25 @@ static int run_copy(struct key *src, struct key *dest, BOOL recurse, BOOL force)
}
}
for (i = 0; recurse; i++)
{
struct key subkey_src, subkey_dest;
name_len = max_name_len;
rc = RegEnumKeyExW(src->hkey, i, name, &name_len, NULL, NULL, NULL, NULL);
if (rc) break;
subkey_src.root = src->hkey;
subkey_src.subkey = name;
subkey_dest.root = dest->hkey;
subkey_dest.subkey = name;
rc = run_copy(&subkey_src, &subkey_dest, TRUE, force);
if (rc) goto cleanup;
}
cleanup:
free(name);
free(data);