changeset 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 b0ec48006d57
children 89936539e3b8
files src/plugins/snarf/snarf-plugin.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;