Module: wine Branch: master Commit: 82fc4c8c62b2e72e749a709352048de48dd274e3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=82fc4c8c62b2e72e749a709352...
Author: Hugh McMaster hugh.mcmaster@outlook.com Date: Fri Aug 25 05:37:06 2017 +0000
reg: Close any open registry keys before starting the key deletion process.
Signed-off-by: Hugh McMaster hugh.mcmaster@outlook.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
programs/reg/import.c | 2 ++ programs/reg/tests/reg.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/programs/reg/import.c b/programs/reg/import.c index b9900b3..a39e1db 100644 --- a/programs/reg/import.c +++ b/programs/reg/import.c @@ -600,6 +600,8 @@ static WCHAR *delete_key_state(struct parser *parser, WCHAR *pos) { WCHAR *p = pos;
+ close_key(parser); + if (*p == 'H' || *p == 'h') { HKEY root; diff --git a/programs/reg/tests/reg.c b/programs/reg/tests/reg.c index 8a9d12a..a373805 100644 --- a/programs/reg/tests/reg.c +++ b/programs/reg/tests/reg.c @@ -1746,7 +1746,7 @@ static void test_import(void) ""Wine46a"=dword:12345678\n\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); verify_key_nonexist(hkey, "Subkey4a"); - todo_wine verify_reg_nonexist(hkey, "Wine46a"); + verify_reg_nonexist(hkey, "Wine46a");
test_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n\n" @@ -3224,7 +3224,7 @@ static void test_unicode_import(void) ""Wine46a"=dword:12345678\n\n", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); verify_key_nonexist(hkey, "Subkey4a"); - todo_wine verify_reg_nonexist(hkey, "Wine46a"); + verify_reg_nonexist(hkey, "Wine46a");
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" "[HKEY_CURRENT_USER\" KEY_BASE "]\n\n"