imap-expunge.c revision 41da195263f4c7f0eaf58f3ecee4d9ceb92ae8c1
/* Copyright (c) 2003-2007 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;
}