Mercurial > dovecot > core-2.2
comparison src/plugins/snarf/snarf-plugin.c @ 12565:b7dd7a966a3a
snarf: Make sure destination mailbox is open when syncing it.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 17 Dec 2010 13:16:01 +0000 |
parents | 8adacd9c03b2 |
children | b748c622e896 44d0474a451e |
comparison
equal
deleted
inserted
replaced
12564:b0ec48006d57 | 12565:b7dd7a966a3a |
---|---|
34 struct mailbox_transaction_context *src_trans, *dest_trans; | 34 struct mailbox_transaction_context *src_trans, *dest_trans; |
35 struct mail_save_context *save_ctx; | 35 struct mail_save_context *save_ctx; |
36 struct mail *mail; | 36 struct mail *mail; |
37 enum mail_error error; | 37 enum mail_error error; |
38 int ret; | 38 int ret; |
39 | |
40 /* make sure the destination mailbox has been opened */ | |
41 if (mailbox_open(destbox) < 0) | |
42 return -1; | |
39 | 43 |
40 if (mailbox_sync(srcbox, MAILBOX_SYNC_FLAG_FULL_READ) < 0) | 44 if (mailbox_sync(srcbox, MAILBOX_SYNC_FLAG_FULL_READ) < 0) |
41 return -1; | 45 return -1; |
42 | 46 |
43 src_trans = mailbox_transaction_begin(srcbox, 0); | 47 src_trans = mailbox_transaction_begin(srcbox, 0); |