struct mailbox *box;
const char *name, *errstr;
enum mail_error error;
+ bool disconnect = FALSE;
/* <mailbox> */
if (!client_read_string_args(cmd, 1, &name))
/* deleting selected mailbox. close it first */
client_search_updates_free(client);
mailbox_free(&client->mailbox);
+ disconnect = TRUE;
}
if (mailbox_delete(box) == 0)
}
}
mailbox_free(&box);
+
+ if (disconnect) {
+ client_disconnect_with_error(cmd->client,
+ "Selected mailbox was deleted, have to disconnect.");
+ }
return TRUE;
}