imap-expunge.c revision 06b3ce71a592e5575b5e1d4f412bd364dc6da69d
/* Copyright (C) 2003 Timo Sirainen */
#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;
enum mailbox_sync_flags flags;
if (mailbox_is_readonly(box)) {
/* silently ignore */
return TRUE;
}
t = mailbox_transaction_begin(box, 0);
if (mail_expunge(mail) < 0) {
break;
}
}
if (mailbox_search_deinit(&ctx) < 0)
if (failed)
else {
if (mailbox_transaction_commit(&t, flags) < 0)
}
return !failed;
}