From 315c7b782441b2db5a7548a488deff563b6c3668 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 8 May 2008 14:33:02 +0200 Subject: registry: regdb_store_keys: move storing the subkey list down after removing values. Michael (This used to be commit 986030cdda828f7f87c5464d1837324b7033e27e) --- source3/registry/reg_backend_db.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source3/registry') diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index 87837448d9..182a7ba694 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -657,14 +657,6 @@ bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr) * out of the blue when re-adding keys later on. */ - /* store the subkey list for the parent */ - - if (!regdb_store_keys_internal(key, ctr) ) { - DEBUG(0,("regdb_store_keys: Failed to store new subkey list " - "for parent [%s]\n", key)); - goto cancel; - } - /* now delete removed keys */ num_subkeys = regsubkey_ctr_numkeys(old_subkeys); @@ -715,6 +707,14 @@ bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr) TALLOC_FREE(old_subkeys); + /* (2) store the subkey list for the parent */ + + if (!regdb_store_keys_internal(key, ctr) ) { + DEBUG(0,("regdb_store_keys: Failed to store new subkey list " + "for parent [%s]\n", key)); + goto cancel; + } + /* now create records for any subkeys that don't already exist */ num_subkeys = regsubkey_ctr_numkeys(ctr); -- cgit