dovecot-2.2: lib-storage: Empty mailbox name isn't valid.
dovecot at dovecot.org
dovecot at dovecot.org
Sat Jun 1 02:56:35 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/c4a85c9df948
changeset: 16437:c4a85c9df948
user: Timo Sirainen <tss at iki.fi>
date: Sat Jun 01 02:56:25 2013 +0300
description:
lib-storage: Empty mailbox name isn't valid.
diffstat:
src/lib-storage/mailbox-list.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (22 lines):
diff -r fbeac7272069 -r c4a85c9df948 src/lib-storage/mailbox-list.c
--- a/src/lib-storage/mailbox-list.c Sat Jun 01 02:25:54 2013 +0300
+++ b/src/lib-storage/mailbox-list.c Sat Jun 01 02:56:25 2013 +0300
@@ -1188,10 +1188,14 @@
bool mailbox_list_is_valid_name(struct mailbox_list *list,
const char *name, const char **error_r)
{
- if (*name == '\0' && *list->ns->prefix != '\0') {
- /* an ugly way to get to mailbox root (e.g. Maildir/ when
- it's not the INBOX) */
- return TRUE;
+ if (*name == '\0') {
+ if (*list->ns->prefix != '\0') {
+ /* an ugly way to get to mailbox root (e.g. Maildir/
+ when it's not the INBOX) */
+ return TRUE;
+ }
+ *error_r = "Name is empty";
+ return FALSE;
}
return mailbox_list_is_valid_fs_name(list, name, error_r);
More information about the dovecot-cvs
mailing list