]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: mailbox_rename() - Improve debug logging when namespaces are incompatible
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 20 Nov 2017 12:28:40 +0000 (14:28 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 20 Nov 2017 12:28:40 +0000 (14:28 +0200)
src/lib-storage/mail-storage.c

index 4faf4e8c8aa10f494bf7bd0f5569e591f68424b4..7625fc7d0c3ce2c10ff96bfd50752dc8ce8daaf1 100644 (file)
@@ -1672,15 +1672,18 @@ mailbox_lists_rename_compatible(struct mailbox_list *list1,
                                const char **error_r)
 {
        if (!nullequals(list1->set.alt_dir, list2->set.alt_dir)) {
-               *error_r = "one namespace has alt dir and another doesn't";
+               *error_r = t_strdup_printf("Namespace %s has alt dir, %s doesn't",
+                                          list1->ns->prefix, list2->ns->prefix);
                return FALSE;
        }
        if (!nullequals(list1->set.index_dir, list2->set.index_dir)) {
-               *error_r = "one namespace has index dir and another doesn't";
+               *error_r = t_strdup_printf("Namespace %s has index dir, %s doesn't",
+                                          list1->ns->prefix, list2->ns->prefix);
                return FALSE;
        }
        if (!nullequals(list1->set.control_dir, list2->set.control_dir)) {
-               *error_r = "one namespace has control dir and another doesn't";
+               *error_r = t_strdup_printf("Namespace %s has control dir, %s doesn't",
+                                          list1->ns->prefix, list2->ns->prefix);
                return FALSE;
        }
        return TRUE;