]> granicus.if.org Git - mutt/commitdiff
Quick fix for IMAP breakage.
authorBrendan Cully <brendan@kublai.com>
Thu, 22 Jul 2004 01:10:55 +0000 (01:10 +0000)
committerBrendan Cully <brendan@kublai.com>
Thu, 22 Jul 2004 01:10:55 +0000 (01:10 +0000)
imap/message.c

index aae35acd492f6edd6cd295518ce247c72d947c8a..577d5420149b5b810535490c0df4f408d2def958 100644 (file)
@@ -61,13 +61,13 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
 
   if (mutt_bit_isset (idata->capabilities,IMAP4REV1))
   {
-    snprintf (hdrreq, sizeof (hdrreq), "BODY.PEEK[HEADER.FIELDS (%s %s)]", 
-      want_headers, ImapHeaders); 
+    snprintf (hdrreq, sizeof (hdrreq), "BODY.PEEK[HEADER.FIELDS (%s%s%s)]", 
+             want_headers, ImapHeaders ? " " : "", ImapHeaders ? ImapHeaders : ""); 
   } 
   else if (mutt_bit_isset (idata->capabilities,IMAP4))
   {
-    snprintf (hdrreq, sizeof (hdrreq), "RFC822.HEADER.LINES (%s %s)", 
-      want_headers, ImapHeaders);
+    snprintf (hdrreq, sizeof (hdrreq), "RFC822.HEADER.LINES (%s%s%s)", 
+             want_headers, ImapHeaders ? " " : "", ImapHeaders ? ImapHeaders : "");
   }
   else
   {    /* Unable to fetch headers for lower versions */