From c14ceb2cabfd4934243d09ff2dfbc24791ef4eb2 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 17 Dec 2010 13:16:01 +0000 Subject: [PATCH] snarf: Make sure destination mailbox is open when syncing it. --- src/plugins/snarf/snarf-plugin.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/snarf/snarf-plugin.c b/src/plugins/snarf/snarf-plugin.c index 7d22530541..0210cedcdc 100644 --- a/src/plugins/snarf/snarf-plugin.c +++ b/src/plugins/snarf/snarf-plugin.c @@ -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; -- 2.47.3