cmd-delete.c revision 08837f59c1466ec0f533f120b167f2a3e87da738
/* Copyright (c) 2002-2013 Dovecot authors, see the included COPYING file */
#include "imap-common.h"
#include "imap-commands.h"
{
struct mail_namespace *ns;
enum mail_error error;
bool disconnect = FALSE;
/* <mailbox> */
return FALSE;
return TRUE;
if (mailbox_is_any_inbox(box)) {
/* IMAP protocol allows this, but I think it's safer to
not allow it. */
mailbox_free(&box);
return TRUE;
}
/* deleting selected mailbox. close it first */
disconnect = TRUE;
}
if (mailbox_delete(box) == 0)
else {
if (error != MAIL_ERROR_EXISTS)
else {
/* mailbox has children */
}
}
mailbox_free(&box);
if (disconnect) {
"Selected mailbox was deleted, have to disconnect.");
}
return TRUE;
}