From: Timo Sirainen Date: Tue, 30 May 2017 06:09:39 +0000 (+0300) Subject: lib-storage: fs_list_get_mailbox_flags() - Reorganize code X-Git-Tag: 2.3.0.rc1~1550 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=348202a977aea7bf72aa0fb62ccfdd6dcc41cb03;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: fs_list_get_mailbox_flags() - Reorganize code No functional changes. --- diff --git a/src/lib-storage/list/mailbox-list-fs-flags.c b/src/lib-storage/list/mailbox-list-fs-flags.c index ed35b49870..94ce93efbf 100644 --- a/src/lib-storage/list/mailbox-list-fs-flags.c +++ b/src/lib-storage/list/mailbox-list-fs-flags.c @@ -186,16 +186,16 @@ int fs_list_get_mailbox_flags(struct mailbox_list *list, } else { *flags_r |= MAILBOX_NOINFERIORS; } - } else { - if ((list->flags & MAILBOX_LIST_FLAG_MAILBOX_FILES) != 0) { - *flags_r |= MAILBOX_NOSELECT | MAILBOX_CHILDREN; - return 1; - } + *flags_r |= STAT_GET_MARKED_FILE(st); + return 1; } if ((list->flags & MAILBOX_LIST_FLAG_MAILBOX_FILES) != 0) { - *flags_r |= STAT_GET_MARKED_FILE(st); - } else if (list->v.is_internal_name == NULL) { + *flags_r |= MAILBOX_NOSELECT | MAILBOX_CHILDREN; + return 1; + } + + if (list->v.is_internal_name == NULL) { /* link count < 2 can happen with filesystems that don't support link counts. we'll just ignore them for now.. */ if (st.st_nlink == 2)