Skip to content

Commit

Permalink
lib-storage: mailbox_list_get_permissions() - Use index dir with ITER…
Browse files Browse the repository at this point in the history
…INDEX
  • Loading branch information
sirainen committed Jul 3, 2017
1 parent 6763c5f commit 4fce6ce
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/lib-storage/mailbox-list.c
Expand Up @@ -972,8 +972,13 @@ mailbox_list_get_permissions_internal(struct mailbox_list *list,
permissions_r->file_create_gid = (gid_t)-1;
permissions_r->file_create_gid_origin = "defaults";

if ((list->flags & MAILBOX_LIST_FLAG_NO_MAIL_FILES) != 0) {
/* mail files don't exist in storage, but index files might. */
if (list->set.iter_from_index_dir ||
(list->flags & MAILBOX_LIST_FLAG_NO_MAIL_FILES) != 0) {
/* a) iterating from index dir. Use the index dir's permissions
as well, since they might be in a faster storage.
b) mail files don't exist in storage, but index files
might. */
(void)mailbox_list_get_path(list, name,
MAILBOX_LIST_PATH_TYPE_INDEX, &path);
}
Expand Down

0 comments on commit 4fce6ce

Please sign in to comment.