Skip to content

Commit

Permalink
lib-storage: fs_list_get_mailbox_flags() - Return mailbox files as se…
Browse files Browse the repository at this point in the history
…lectable

Avoids a second stat() later on, which would do the same anyway.
  • Loading branch information
sirainen authored and villesavolainen committed Jun 9, 2017
1 parent 788671d commit e323ab7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib-storage/list/mailbox-list-fs-flags.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit e323ab7

Please sign in to comment.