X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=imap%2Fmx_imap.c;h=26ee4769951cd20e02a0ef2a12c2c4dcc60fe631;hb=82d5d8ffc8cd4cf837736187eba9ddfd8b2e2f7f;hp=b44f9e1d83cdbc40e239524a13aaae9bec268090;hpb=baf86ef44a449017ea20c3fcb252b66dc43fe6ce;p=apps%2Fmadmutt.git diff --git a/imap/mx_imap.c b/imap/mx_imap.c index b44f9e1..26ee476 100644 --- a/imap/mx_imap.c +++ b/imap/mx_imap.c @@ -24,8 +24,6 @@ int imap_is_magic (const char* path, struct stat* st) { url_scheme_t s; if (!path || !*path) return (-1); - if (*path == '{') /* painpine compatibility */ - return (M_IMAP); s = url_check_scheme (NONULL (path)); return ((s == U_IMAP || s == U_IMAPS) ? M_IMAP : -1); } @@ -52,6 +50,14 @@ static int _imap_check_mailbox (CONTEXT* ctx, int* index_hint, int lock) { return (imap_check_mailbox (ctx, index_hint, 0)); } +static int imap_commit_message (MESSAGE* msg, CONTEXT* ctx) { + int r = 0; + + if ((r = safe_fclose (&msg->fp)) == 0) + r = imap_append_message (ctx, msg); + return (r); +} + mx_t* imap_reg_mx (void) { mx_t* fmt = safe_calloc (1, sizeof (mx_t)); @@ -65,5 +71,6 @@ mx_t* imap_reg_mx (void) { fmt->mx_fastclose_mailbox = imap_close_mailbox; fmt->mx_sync_mailbox = imap_sync_mailbox; fmt->mx_check_mailbox = _imap_check_mailbox; + fmt->mx_commit_message = imap_commit_message; return (fmt); }