]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
zlib plugin: Removed explicit checks for maildir/sdbox/mdbox.
authorTimo Sirainen <tss@iki.fi>
Wed, 12 Jun 2013 01:44:11 +0000 (04:44 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 12 Jun 2013 01:44:11 +0000 (04:44 +0300)
src/plugins/zlib/zlib-plugin.c

index 5076702294fb0d00a9962b56f5fdf10189cf046d..c5538a7cb6ddf502fe09af3c597cc5bb3b5086b6 100644 (file)
@@ -7,9 +7,6 @@
 #include "ostream.h"
 #include "str.h"
 #include "mail-user.h"
-#include "dbox-single/sdbox-storage.h"
-#include "dbox-multi/mdbox-storage.h"
-#include "maildir/maildir-storage.h"
 #include "index-storage.h"
 #include "index-mail.h"
 #include "compression.h"
@@ -361,9 +358,8 @@ static void zlib_mailbox_allocated(struct mailbox *box)
 
        MODULE_CONTEXT_SET_SELF(box, zlib_storage_module, zbox);
 
-       if (strcmp(box->storage->name, MAILDIR_STORAGE_NAME) == 0 ||
-           strcmp(box->storage->name, MDBOX_STORAGE_NAME) == 0 ||
-           strcmp(box->storage->name, SDBOX_STORAGE_NAME) == 0)
+       if ((box->storage->class_flags &
+            MAIL_STORAGE_CLASS_FLAG_OPEN_STREAMS) == 0)
                zlib_permail_alloc_init(box, v);
 }