Blame SOURCES/0060-Ticket-49334-fix-backup-restore-if-changelog-exists.patch

b69e47
From c903f66194f04e97fc684f5a9654cedb27530931 Mon Sep 17 00:00:00 2001
b69e47
From: Ludwig Krispenz <lkrispen@redhat.com>
b69e47
Date: Mon, 31 Jul 2017 10:51:08 +0200
b69e47
Subject: [PATCH 1/3] Ticket 49334 - fix backup restore if changelog exists
b69e47
b69e47
The corrcect flag to copy a directory in backup/restore must be passed for the changelog directory
b69e47
b69e47
Reviewed by: William, thanks
b69e47
---
b69e47
 ldap/servers/slapd/back-ldbm/dblayer.c | 4 ++--
b69e47
 1 file changed, 2 insertions(+), 2 deletions(-)
b69e47
b69e47
diff --git a/ldap/servers/slapd/back-ldbm/dblayer.c b/ldap/servers/slapd/back-ldbm/dblayer.c
b69e47
index ff97aa4..3a97f2f 100644
b69e47
--- a/ldap/servers/slapd/back-ldbm/dblayer.c
b69e47
+++ b/ldap/servers/slapd/back-ldbm/dblayer.c
b69e47
@@ -6143,7 +6143,7 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task *task)
b69e47
             return_value = dblayer_copy_directory(li, task, changelogdir,
b69e47
                                                   changelog_destdir,
b69e47
                                                   0 /* backup */,
b69e47
-                                                  &cnt, 1, 0, 0);
b69e47
+                                                  &cnt, 0, 0, 1);
b69e47
             if (return_value) {
b69e47
                 slapi_log_err(SLAPI_LOG_ERR,
b69e47
                           "dblayer_backup", "Error in copying directory "
b69e47
@@ -6823,7 +6823,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task *task, char *
b69e47
                     *cldirname = '\0';
b69e47
                     return_value = dblayer_copy_directory(li, task, filename1,
b69e47
                                                           changelogdir, 1 /* restore */,
b69e47
-                                                          &cnt, 1, 0 ,0);
b69e47
+                                                          &cnt, 0, 0 ,1);
b69e47
                     *cldirname = '/';
b69e47
                     if (return_value) {
b69e47
                         slapi_log_err(SLAPI_LOG_ERR,
b69e47
-- 
b69e47
2.9.4
b69e47