summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/registry/patchfile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/lib/registry/patchfile.c b/source4/lib/registry/patchfile.c
index 6b08cf8948..0da722bb6d 100644
--- a/source4/lib/registry/patchfile.c
+++ b/source4/lib/registry/patchfile.c
@@ -280,10 +280,16 @@ _PUBLIC_ WERROR reg_generate_diff(struct registry_context *ctx1,
continue;
}
+ /* if "r1" is NULL (old hive) and "r2" isn't (new hive) then
+ * the hive doesn't exist yet and we have to generate an add
+ * diff */
if ((r1 == NULL) && (r2 != NULL)) {
callbacks->add_key(callback_data,
reg_predefined_keys[i].name);
}
+ /* if "r1" isn't NULL (old hive) and "r2" is (new hive) then
+ * the hive shouldn't exist anymore and we have to generate a
+ * del diff */
if ((r1 != NULL) && (r2 == NULL)) {
callbacks->del_key(callback_data,
reg_predefined_keys[i].name);