From: Timo Sirainen Date: Tue, 30 May 2017 06:15:09 +0000 (+0300) Subject: lib-storage: fs_list_get_mailbox_flags() - Return mailbox files as selectable X-Git-Tag: 2.3.0.rc1~1547 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9934242994745cb810b290e3127f6a75d89d2177;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: fs_list_get_mailbox_flags() - Return mailbox files as selectable Avoids a second stat() later on, which would do the same anyway. --- diff --git a/src/lib-storage/list/mailbox-list-fs-flags.c b/src/lib-storage/list/mailbox-list-fs-flags.c index 828ee5d6fe..b21032742a 100644 --- a/src/lib-storage/list/mailbox-list-fs-flags.c +++ b/src/lib-storage/list/mailbox-list-fs-flags.c @@ -200,6 +200,11 @@ int fs_list_get_mailbox_flags(struct mailbox_list *list, } else { *flags_r |= MAILBOX_NOINFERIORS; } + /* Return mailbox files as always existing. The current + mailbox_exists() code would do the same stat() anyway + without further checks, so might as well avoid the second + stat(). */ + *flags_r |= MAILBOX_SELECT; *flags_r |= STAT_GET_MARKED_FILE(st); return 1; }