mail-copy.c revision 7f735cb86b2d8abd8f230089065eacfc24e9e5d6
/* Copyright (c) 2004-2010 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream.h"
#include "mail-storage-private.h"
#include "mail-copy.h"
static int
{
const char *from_envelope, *guid;
/* we need to open the file in any case. caching metadata is unlikely
to help anything. */
return -1;
return -1;
}
&from_envelope) < 0)
return -1;
if (*from_envelope != '\0')
}
return -1;
if (*guid != '\0')
}
return -1;
do {
if (mailbox_save_continue(ctx) < 0)
break;
if (input->stream_errno != 0) {
"copy: i_stream_read() failed: %m");
return -1;
}
return 0;
}
{
/* keywords gets unreferenced twice: first in
mailbox_save_cancel()/_finish() and second time in
mailbox_copy(). */
}
return -1;
}
return mailbox_save_finish(&ctx);
}
{
}