dovecot: Files aren't valid cydir mailboxes. Also comment updates.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Jul 23 08:11:03 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/447849dcc156
changeset: 6138:447849dcc156
user: Timo Sirainen <tss at iki.fi>
date: Mon Jul 23 04:45:35 2007 +0300
description:
Files aren't valid cydir mailboxes. Also comment updates.
diffstat:
1 file changed, 6 insertions(+), 4 deletions(-)
src/lib-storage/index/cydir/cydir-storage.c | 10 ++++++----
diffs (35 lines):
diff -r 327688eb425a -r 447849dcc156 src/lib-storage/index/cydir/cydir-storage.c
--- a/src/lib-storage/index/cydir/cydir-storage.c Sat Jul 21 10:03:47 2007 +0300
+++ b/src/lib-storage/index/cydir/cydir-storage.c Mon Jul 23 04:45:35 2007 +0300
@@ -347,7 +347,8 @@ static void cydir_notify_changes(struct
index_mailbox_check_add(&mbox->ibox, mbox->path);
}
-static int cydir_list_iter_is_mailbox(struct mailbox_list_iterate_context *ctx,
+static int cydir_list_iter_is_mailbox(struct mailbox_list_iterate_context *ctx
+ __attr_unused__,
const char *dir, const char *fname,
enum mailbox_list_file_type type,
enum mailbox_info_flags *flags)
@@ -359,9 +360,9 @@ static int cydir_list_iter_is_mailbox(st
/* try to avoid stat() with these checks */
if (type != MAILBOX_LIST_FILE_TYPE_DIR &&
type != MAILBOX_LIST_FILE_TYPE_SYMLINK &&
- type != MAILBOX_LIST_FILE_TYPE_UNKNOWN &&
- (ctx->flags & MAILBOX_LIST_ITER_RETURN_NO_FLAGS) != 0) {
+ type != MAILBOX_LIST_FILE_TYPE_UNKNOWN) {
/* it's a file */
+ *flags |= MAILBOX_NOSELECT | MAILBOX_NOINFERIORS;
return 0;
}
@@ -376,7 +377,8 @@ static int cydir_list_iter_is_mailbox(st
ret = 0;
}
} else {
- /* non-selectable, but may contain subdirs */
+ /* non-selectable. probably either access denied, or symlink
+ destination not found. don't bother logging errors. */
*flags |= MAILBOX_NOSELECT;
}
t_pop();
More information about the dovecot-cvs
mailing list