dovecot-2.0: lib-storage: Fixed renaming mailboxes in a non-priv...

dovecot at dovecot.org dovecot at dovecot.org
Thu Feb 17 08:29:51 EET 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/3c61817f30bb
changeset: 12599:3c61817f30bb
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Feb 17 08:29:47 2011 +0200
description:
lib-storage: Fixed renaming mailboxes in a non-private namespace.

diffstat:

 src/lib-storage/mail-storage.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (15 lines):

diff -r aba5a6a24b99 -r 3c61817f30bb src/lib-storage/mail-storage.c
--- a/src/lib-storage/mail-storage.c	Thu Feb 17 08:12:21 2011 +0200
+++ b/src/lib-storage/mail-storage.c	Thu Feb 17 08:29:47 2011 +0200
@@ -844,8 +844,9 @@
 			"Can't rename mailboxes across specified storages.");
 		return -1;
 	}
-	if (src->list->ns->type != NAMESPACE_PRIVATE ||
-	    dest->list->ns->type != NAMESPACE_PRIVATE) {
+	if (src->list != dest->list &&
+	    (src->list->ns->type != NAMESPACE_PRIVATE ||
+	     dest->list->ns->type != NAMESPACE_PRIVATE)) {
 		mail_storage_set_error(src->storage, MAIL_ERROR_NOTPOSSIBLE,
 			"Renaming not supported across non-private namespaces.");
 		return -1;


More information about the dovecot-cvs mailing list