/* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
#include "imap-common.h"
#include "str.h"
#include "ostream.h"
#include "imap-resp-code.h"
#include "imap-util.h"
#include "imap-commands.h"
#include "imap-search-args.h"
#include <time.h>
{
return;
/* make sure it doesn't get stuck on the corked stream */
}
}
struct mailbox_transaction_context *t,
struct mailbox_transaction_context **src_trans_r,
struct mail_search_args *search_args,
const char **src_uidset_r,
unsigned int *copy_count_r)
{
unsigned int copy_count = 0;
int ret;
ret = 1;
ret = 0;
break;
}
if ((++copy_count % COPY_CHECK_INTERVAL) == 0)
save_ctx = mailbox_save_alloc(t);
if (move) {
ret = -1;
} else {
ret = -1;
}
ret = 0;
}
if (mailbox_search_deinit(&search_ctx) < 0)
ret = -1;
*src_trans_r = src_trans;
return ret;
}
unsigned int count)
{
"\\Trash"))
}
{
unsigned int copy_count;
int ret;
/* <message set> <mailbox> */
return FALSE;
if (!client_verify_open_mailbox(cmd))
return TRUE;
if (ret <= 0)
return ret < 0;
return TRUE;
}
&src_uidset, ©_count);
if (ret <= 0)
else if (mailbox_transaction_commit_get_changes(&t, &changes) < 0) {
/* storage backend didn't notice the expunge until
at commit time. */
ret = 0;
} else {
ret = -1;
}
} else if (copy_count == 0) {
/* not supported by backend (virtual) or no read permissions
for mailbox */
"OK Copy completed.");
} else if (move) {
str_truncate(msg, 0);
} else {
}
/* move failed, don't expunge anything */
} else {
if (mailbox_transaction_commit(&src_trans) < 0)
ret = -1;
}
if (move)
else
} else if (move) {
}
if (ret > 0)
else if (ret == 0) {
/* some messages were expunged, sync them */
"Some of the requested messages no longer exist.");
} else {
return TRUE;
}
}
{
}
{
}