]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Shared mailboxes: Fixed a bug where some mailboxes were added to root shared namespace.
authorTimo Sirainen <tss@iki.fi>
Wed, 29 Apr 2009 18:26:09 +0000 (14:26 -0400)
committerTimo Sirainen <tss@iki.fi>
Wed, 29 Apr 2009 18:26:09 +0000 (14:26 -0400)
--HG--
branch : HEAD

src/lib-storage/mail-storage.c

index 600999ab631c8691a07c8db1acb9802debfed9d1..66c97c67b7a1e3f5ff44a3a6760300f734a6851c 100644 (file)
@@ -433,18 +433,18 @@ struct mailbox *mailbox_open(struct mail_storage **_storage, const char *name,
                             enum mailbox_open_flags flags)
 {
        struct mail_storage *storage = *_storage;
-       struct mailbox_list *list = storage->list;
        struct mailbox *box;
 
-       if (list->v.get_storage != NULL) {
-               if (list->v.get_storage(list, &name, &storage) < 0)
+       if (storage->list->v.get_storage != NULL) {
+               if (storage->list->v.get_storage(storage->list,
+                                                &name, &storage) < 0)
                        return NULL;
                *_storage = storage;
        }
 
        mail_storage_clear_error(storage);
 
-       if (!mailbox_list_is_valid_existing_name(list, name)) {
+       if (!mailbox_list_is_valid_existing_name(storage->list, name)) {
                mail_storage_set_error(storage, MAIL_ERROR_PARAMS,
                                       "Invalid mailbox name");
                return NULL;