]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
snarf: Make sure destination mailbox is open when syncing it.
authorTimo Sirainen <tss@iki.fi>
Fri, 17 Dec 2010 13:16:01 +0000 (13:16 +0000)
committerTimo Sirainen <tss@iki.fi>
Fri, 17 Dec 2010 13:16:01 +0000 (13:16 +0000)
src/plugins/snarf/snarf-plugin.c

index 7d2253054142e08f8b07ff76a7d309ed353221d9..0210cedcdcf301c9b6c8646af9023ac9e8734aa3 100644 (file)
@@ -37,6 +37,10 @@ static int snarf(struct mailbox *srcbox, struct mailbox *destbox)
        enum mail_error error;
        int ret;
 
+       /* make sure the destination mailbox has been opened */
+       if (mailbox_open(destbox) < 0)
+               return -1;
+
        if (mailbox_sync(srcbox, MAILBOX_SYNC_FLAG_FULL_READ) < 0)
                return -1;