dovecot-2.0: snarf: Make sure destination mailbox is open when s...

dovecot at dovecot.org dovecot at dovecot.org
Fri Dec 17 15:16:04 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/b7dd7a966a3a
changeset: 12527:b7dd7a966a3a
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Dec 17 13:16:01 2010 +0000
description:
snarf: Make sure destination mailbox is open when syncing it.

diffstat:

 src/plugins/snarf/snarf-plugin.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r b0ec48006d57 -r b7dd7a966a3a src/plugins/snarf/snarf-plugin.c
--- a/src/plugins/snarf/snarf-plugin.c	Wed Dec 15 17:07:01 2010 +0000
+++ b/src/plugins/snarf/snarf-plugin.c	Fri Dec 17 13:16:01 2010 +0000
@@ -37,6 +37,10 @@
 	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;
 


More information about the dovecot-cvs mailing list