dovecot-2.2: lib-storage: Never auto-remove the auto-created pre...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Feb 26 10:30:21 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/c9491a07998b
changeset: 15969:c9491a07998b
user: Timo Sirainen <tss at iki.fi>
date: Tue Feb 26 10:30:15 2013 +0200
description:
lib-storage: Never auto-remove the auto-created prefix="" namespace.
diffstat:
src/lib-storage/mail-user.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r 2583040ca9aa -r c9491a07998b src/lib-storage/mail-user.c
--- a/src/lib-storage/mail-user.c Tue Feb 26 09:05:09 2013 +0200
+++ b/src/lib-storage/mail-user.c Tue Feb 26 10:30:15 2013 +0200
@@ -264,11 +264,15 @@
{
struct mail_namespace *ns, *next;
+ /* drop all autocreated unusable (typically shared) namespaces.
+ don't drop the autocreated prefix="" namespace that we explicitly
+ created for being the fallback namespace. */
for (ns = user->namespaces; ns != NULL; ns = next) {
next = ns->next;
if ((ns->flags & NAMESPACE_FLAG_USABLE) == 0 &&
- (ns->flags & NAMESPACE_FLAG_AUTOCREATED) != 0)
+ (ns->flags & NAMESPACE_FLAG_AUTOCREATED) != 0 &&
+ ns->prefix_len > 0)
mail_namespace_destroy(ns);
}
}
More information about the dovecot-cvs
mailing list