imap-expunge.c revision f3bb2fbe87425dc89a839908985af496f7f65702
/* Copyright (c) 2003-2009 Dovecot authors, see the included COPYING file */
#include "imap-common.h"
#include "mail-storage.h"
#include "mail-search-build.h"
#include "imap-expunge.h"
{
struct mail_search_context *ctx;
struct mailbox_transaction_context *t;
struct mail_search_args *search_args;
if (mailbox_is_readonly(box)) {
/* silently ignore */
return 0;
}
/* Refresh the flags so we'll expunge all messages marked as \Deleted
by any session. */
}
if (mailbox_search_deinit(&ctx) < 0) {
return -1;
} else {
if (mailbox_transaction_commit(&t) < 0)
return -1;
}
return expunges ? 1 : 0;
}