Mercurial > dovecot > core-2.2
diff src/lib-storage/index/dbox-multi/mdbox-storage.c @ 12312:28eaaa23f2c6
lib-storage: Added support for saving mail attachments separately via filesystem API.
Currently this works only with sdbox and mdbox backends.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 19 Oct 2010 18:47:17 +0100 |
parents | b2e9ecbc82fe |
children | b884441a713f |
line wrap: on
line diff
--- a/src/lib-storage/index/dbox-multi/mdbox-storage.c Tue Oct 19 18:30:51 2010 +0100 +++ b/src/lib-storage/index/dbox-multi/mdbox-storage.c Tue Oct 19 18:47:17 2010 +0100 @@ -60,7 +60,7 @@ i_array_init(&storage->open_files, 64); storage->map = mdbox_map_init(storage, ns->list); - return 0; + return dbox_storage_create(_storage, ns, error_r); } static void mdbox_storage_destroy(struct mail_storage *_storage) @@ -77,6 +77,7 @@ if (array_is_created(&storage->move_to_alt_map_uids)) array_free(&storage->move_to_alt_map_uids); array_free(&storage->open_files); + dbox_storage_destroy(_storage); } struct mailbox * @@ -271,6 +272,12 @@ } } +static const char * +mdbox_get_attachment_path_suffix(struct dbox_file *file ATTR_UNUSED) +{ + return ""; +} + static void mdbox_set_mailbox_corrupted(struct mailbox *box) { struct mdbox_storage *mstorage = (struct mdbox_storage *)box->storage; @@ -425,6 +432,7 @@ mdbox_save_finish, mdbox_save_cancel, mdbox_copy, + NULL, index_storage_is_inconsistent } }; @@ -434,6 +442,7 @@ mdbox_file_create_fd, mdbox_mail_open, mdbox_mailbox_create_indexes, + mdbox_get_attachment_path_suffix, mdbox_set_mailbox_corrupted, mdbox_set_file_corrupted };