EXPORTED int mailbox_has_conversations_full(struct mailbox *mailbox, int allow_deleted)
{
    char *path;

    /* not needed */
    if (!config_getswitch(IMAPOPT_CONVERSATIONS))
        return 0;

    /* we never store data about deleted mailboxes */
    if (!allow_deleted && mboxname_isdeletedmailbox(mailbox_name(mailbox), NULL))
        return 0;

    /* we never store data about submission mailboxes */
    if (mboxname_issubmissionmailbox(mailbox_name(mailbox), mailbox_mbtype(mailbox)))
        return 0;

    path = conversations_getmboxpath(mailbox_name(mailbox));
    if (!path) return 0;
    free(path);

    return 1;
}
EXPORTED int mailbox_has_conversations_full(struct mailbox *mailbox, int allow_deleted)
{
    char *path;

     
    if (!config_getswitch(IMAPOPT_CONVERSATIONS))
        return 0;

     
    if (!allow_deleted && mboxname_isdeletedmailbox(mailbox_name(mailbox), NULL))
        return 0;

     
    if (mboxname_issubmissionmailbox(mailbox_name(mailbox), mailbox_mbtype(mailbox)))
        return 0;

    path = conversations_getmboxpath(mailbox_name(mailbox));
    if (!path) return 0;
    free(path);

    return 1;
}