Hugh McMaster : regedit: Close any open registry keys before starting the key deletion process.

Alexandre Julliard julliard at winehq.org
Fri Aug 25 12:30:11 CDT 2017


Module: wine
Branch: master
Commit: 60e771e686a9424efaf0bdfa90d4fb8d7255da04
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=60e771e686a9424efaf0bdfa90d4fb8d7255da04

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Fri Aug 25 05:36:49 2017 +0000

regedit: Close any open registry keys before starting the key deletion process.

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

---

 programs/regedit/regproc.c       | 2 ++
 programs/regedit/tests/regedit.c | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c
index 58ca5ac..162d088 100644
--- a/programs/regedit/regproc.c
+++ b/programs/regedit/regproc.c
@@ -708,6 +708,8 @@ static WCHAR *delete_key_state(struct parser *parser, WCHAR *pos)
 {
     WCHAR *p = pos;
 
+    close_key(parser);
+
     if (*p == 'H' || *p == 'h')
         delete_registry_key(p);
 
diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c
index 9b2f1fb..5e895ab 100644
--- a/programs/regedit/tests/regedit.c
+++ b/programs/regedit/tests/regedit.c
@@ -3016,7 +3016,7 @@ static void test_key_creation_and_deletion(void)
                     "[-HKEY_CURRENT_USER\\" KEY_BASE "\\Subkey4a]\n"
                     "\"Wine1a\"=dword:12345678\n\n");
     verify_key_nonexist(hkey, "Subkey4a");
-    todo_wine verify_reg_nonexist(hkey, "Wine1a");
+    verify_reg_nonexist(hkey, "Wine1a");
 
     exec_import_str("REGEDIT4\n\n"
                     "[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n"
@@ -3166,7 +3166,7 @@ static void test_key_creation_and_deletion_unicode(void)
                      "[-HKEY_CURRENT_USER\\" KEY_BASE "\\Subkey4a]\n"
                      "\"Wine1a\"=dword:12345678\n\n");
     verify_key_nonexist(hkey, "Subkey4a");
-    todo_wine verify_reg_nonexist(hkey, "Wine1a");
+    verify_reg_nonexist(hkey, "Wine1a");
 
     exec_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n"
                      "[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n"




More information about the wine-cvs mailing list