/* special case for appending to compressed folders -
* even if we can not open them for reading */
if (mutt_can_append_compressed (ctx->path))
mutt_open_append_compressed (ctx);
/* special case for appending to compressed folders -
* even if we can not open them for reading */
if (mutt_can_append_compressed (ctx->path))
mutt_open_append_compressed (ctx);
if (stat (ctx->path, &sb) == 0) {
ctx->magic = mx_get_magic (ctx->path);
if (stat (ctx->path, &sb) == 0) {
ctx->magic = mx_get_magic (ctx->path);
/* the 1 is only of interest for IMAP and means EXPUNGE */
rc = MX_COMMAND(ctx->magic-1,mx_sync_mailbox(ctx,1,index_hint));
/* the 1 is only of interest for IMAP and means EXPUNGE */
rc = MX_COMMAND(ctx->magic-1,mx_sync_mailbox(ctx,1,index_hint));
if (option (OPTMARKOLD)) {
for (i = 0; i < ctx->msgcount; i++) {
if (!ctx->hdrs[i]->deleted && !ctx->hdrs[i]->old)
if (option (OPTMARKOLD)) {
for (i = 0; i < ctx->msgcount; i++) {
if (!ctx->hdrs[i]->deleted && !ctx->hdrs[i]->old)
/* allow IMAP to preserve the deleted flag across sessions */
if (ctx->magic == M_IMAP) {
if ((check = imap_sync_mailbox (ctx, purge, index_hint)) != 0) {
/* allow IMAP to preserve the deleted flag across sessions */
if (ctx->magic == M_IMAP) {
if ((check = imap_sync_mailbox (ctx, purge, index_hint)) != 0) {
if (ctx->magic == M_IMAP)
rc = imap_sync_mailbox (ctx, purge, index_hint);
else
if (ctx->magic == M_IMAP)
rc = imap_sync_mailbox (ctx, purge, index_hint);
else
mutt_message (_("%d kept, %d deleted."), msgcount - deleted, deleted);
mutt_sleep (0);
mutt_message (_("%d kept, %d deleted."), msgcount - deleted, deleted);
mutt_sleep (0);
* at least with the new threading code.
*/
if (purge || (ctx->magic != M_MAILDIR && ctx->magic != M_MH)) {
* at least with the new threading code.
*/
if (purge || (ctx->magic != M_MAILDIR && ctx->magic != M_MH)) {
{
mx_update_tables (ctx, 1);
mutt_sort_headers (ctx, 1); /* rethread from scratch */
{
mx_update_tables (ctx, 1);
mutt_sort_headers (ctx, 1); /* rethread from scratch */
- if (WithCrypto) {
- /* NOTE: this _must_ be done before the check for mailcap! */
- h->security = crypt_query (h->content);
- }
+ /* NOTE: this _must_ be done before the check for mailcap! */
+ h->security = crypt_query (h->content);
list_push_back (&MailboxFormats, (void*) mmdf_reg_mx ());
list_push_back (&MailboxFormats, (void*) mh_reg_mx ());
list_push_back (&MailboxFormats, (void*) maildir_reg_mx ());
list_push_back (&MailboxFormats, (void*) mmdf_reg_mx ());
list_push_back (&MailboxFormats, (void*) mh_reg_mx ());
list_push_back (&MailboxFormats, (void*) maildir_reg_mx ());
#ifdef DEBUG
/* check module registration for completeness with debug versions */
#define EXITWITHERR(m) do { fprintf(stderr, "error: incomplete mx module: %s is missing for type %i\n",m,i);exit(1); } while (0)
#ifdef DEBUG
/* check module registration for completeness with debug versions */
#define EXITWITHERR(m) do { fprintf(stderr, "error: incomplete mx module: %s is missing for type %i\n",m,i);exit(1); } while (0)
for (i = 0; i < Incoming->length; i++) {
b = (BUFFY*) Incoming->data[i];
magic = mx_get_magic (b->path);
for (i = 0; i < Incoming->length; i++) {
b = (BUFFY*) Incoming->data[i];
magic = mx_get_magic (b->path);