Mercurial > dovecot > core-2.2
changeset 22119:b851ae883087
lib-storage: fs_list_get_mailbox_flags() - Return mailbox files as selectable
Avoids a second stat() later on, which would do the same anyway.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Tue, 30 May 2017 09:15:09 +0300 |
parents | 750f39bfac6c |
children | 59626374824b |
files | src/lib-storage/list/mailbox-list-fs-flags.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/list/mailbox-list-fs-flags.c Tue May 30 09:12:05 2017 +0300 +++ b/src/lib-storage/list/mailbox-list-fs-flags.c Tue May 30 09:15:09 2017 +0300 @@ -200,6 +200,11 @@ } 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; }