/* Copyright (c) 2004-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream.h"
#include "mail-storage-private.h"
#include "mail-copy.h"
static void
const char *func)
{
const char *errstr;
return;
}
{
return -1;
}
}
&from_envelope) < 0) {
return -1;
}
if (*from_envelope != '\0')
}
return -1;
}
if (*guid != '\0')
}
return 0;
}
static int
{
/* we need to open the file in any case. caching metadata is unlikely
to help anything. */
return -1;
}
return -1;
return -1;
do {
if (mailbox_save_continue(ctx) < 0)
break;
} while (ret != -1);
if (input->stream_errno != 0) {
"copy: i_stream_read(%s) failed: %s",
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);
}
{
/* if we don't have read permissions, we can't hard link
(basically we'll catch 0600 files here) */
return FALSE;
}
}