- switch (ctx->magic) {
- case M_MBOX:
- case M_MMDF:
- rc = mbox_sync_mailbox (ctx, index_hint);
-#ifdef BUFFY_SIZE
- tmp = mutt_find_mailbox (ctx->path);
-#endif
- break;
-
- case M_MH:
- case M_MAILDIR:
- rc = mh_sync_mailbox (ctx, index_hint);
- break;
-
-#ifdef USE_IMAP
- case M_IMAP:
- /* extra argument means EXPUNGE */
- rc = imap_sync_mailbox (ctx, 1, index_hint);
- break;
-#endif /* USE_IMAP */
-
-#ifdef USE_POP
- case M_POP:
- rc = pop_sync_mailbox (ctx, index_hint);
- break;
-#endif /* USE_POP */
-
-#ifdef USE_NNTP
- case M_NNTP:
- rc = nntp_sync_mailbox (ctx);
- break;
-#endif /* USE_NNTP */
- }
-
-#if 0
- if (!ctx->quiet && !ctx->shutup && rc == -1)
- mutt_error (_("Could not synchronize mailbox %s!"), ctx->path);
-#endif
-
-#ifdef BUFFY_SIZE
- if (tmp && tmp->new == 0)
- mutt_update_mailbox (tmp);
-#endif
+ if (MX_IDX(ctx->magic-1))
+ /* the 1 is only of interest for IMAP and means EXPUNGE */
+ rc = MX_COMMAND(ctx->magic-1,mx_sync_mailbox(ctx,1,index_hint));