X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=imap%2Fimap.c;h=9a2234fef95e3ed1bbe71f9a3ce14cf899f72a70;hp=022415ffb7cea26ad4eb527c032a4d19a134370e;hb=adbac5bafc8f1ebe348b38342ace473f128d762a;hpb=b17296ba049d71986028ac83f0b415a021d0691c diff --git a/imap/imap.c b/imap/imap.c index 022415f..9a2234f 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -214,7 +214,7 @@ int imap_read_literal (FILE * fp, IMAP_DATA * idata, long bytes, progress_t* bar if (bar && !(pos % 1024)) mutt_progress_bar (bar, pos); #ifdef DEBUG - if (DebugLevel >= IMAP_LOG_LTRL) + if (DebugFile && DebugLevel >= IMAP_LOG_LTRL) fputc (c, DebugFile); #endif } @@ -1136,9 +1136,12 @@ int imap_check_mailbox (CONTEXT * ctx, int *index_hint, int force) return result; } -/* returns count of recent messages if new = 1, else count of total messages. - * (useful for at least postponed function) - * Question of taste: use RECENT or UNSEEN for new? +/* + * count messages: + * new == 1: recent + * new == 2: unseen + * otherwise: total + * return: * 0+ number of messages in mailbox * -1 error while polling mailboxes */ @@ -1186,7 +1189,7 @@ int imap_mailbox_check (char *path, int new) else if (mutt_bit_isset (idata->capabilities, IMAP4REV1) || mutt_bit_isset (idata->capabilities, STATUS)) { snprintf (buf, sizeof (buf), "STATUS %s (%s)", mbox, - new ? "RECENT" : "MESSAGES"); + new == 1 ? "RECENT" : (new == 2 ? "UNSEEN" : "MESSAGES")); } else /* Server does not support STATUS, and this is not the current mailbox.