[WINESYNC] reg: Fail if the source and destination keys are the same when copying.

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

wine commit id 0abc002a3e232be3445241e435ef17ac89d6c947 by Hugh McMaster <hugh.mcmaster@outlook.com>

manual adjustment needed
This commit is contained in:
winesync 2022-01-17 18:43:11 +01:00 committed by Thomas Csovcsity
parent ded0675d66
commit 20aa38c6e7
4 changed files with 17 additions and 11 deletions

View file

@ -163,6 +163,12 @@ int reg_copy(int argc, WCHAR *argvW[])
}
}
if (src.root == dest.root && !lstrcmpiW(src.subkey, dest.subkey))
{
output_message(STRING_COPY_SRC_DEST_SAME);
return 1;
}
return run_copy(&src, &dest, recurse, force);
invalid: