]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: fs_list_get_mailbox_flags() - Reorganize code
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 30 May 2017 06:09:39 +0000 (09:09 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Fri, 9 Jun 2017 07:24:36 +0000 (10:24 +0300)
No functional changes.

src/lib-storage/list/mailbox-list-fs-flags.c

index ed35b49870e0661859d5b82b2700a05b4f3fab50..94ce93efbf0d3b929c57d14851769b56a7c06574 100644 (file)
@@ -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)