imap-expunge.c revision 76b43e4417bab52e913da39b5f5bc2a130d3f149
/* Copyright (c) 2003-2008 Dovecot authors, see the included COPYING file */
#include "common.h"
#include "mail-storage.h"
#include "mail-search.h"
#include "imap-expunge.h"
{
struct mail_search_context *ctx;
struct mailbox_transaction_context *t;
struct mail_search_arg search_arg;
bool failed;
if (mailbox_is_readonly(box)) {
/* silently ignore */
return TRUE;
}
t = mailbox_transaction_begin(box, 0);
if (mailbox_search_deinit(&ctx) < 0) {
} else {
failed = mailbox_transaction_commit(&t) < 0;
}
return !failed;
}