]> granicus.if.org Git - neomutt/commitdiff
IMAP fixes from Nathan Neulinger.
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 1 Sep 1998 06:54:53 +0000 (06:54 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 1 Sep 1998 06:54:53 +0000 (06:54 +0000)
(<19980831170941.A7327@umr.edu> on mutt-dev.)

imap.c

diff --git a/imap.c b/imap.c
index 98419de53b029ab51e41fabc9c1d2728b728ed1a..d7aa2d3ea86ad252f1e40c59937c7cfe51778a1a 100644 (file)
--- a/imap.c
+++ b/imap.c
@@ -912,7 +912,9 @@ int imap_fetch_message (MESSAGE *msg, CONTEXT *ctx, int msgno)
             * header is. We must set it now, or mutt will not display
             * the message properly
             */
-           ctx->hdrs[msgno]->content->offset=ftell(msg->fp);
+           ctx->hdrs[msgno]->content->offset = ftell(msg->fp);
+           ctx->hdrs[msgno]->content->length = bytes - 
+             ctx->hdrs[msgno]->content->offset;
            onbody=1;
          }
        }
@@ -924,10 +926,10 @@ int imap_fetch_message (MESSAGE *msg, CONTEXT *ctx, int msgno)
   while (strncmp (buf, seq, SEQLEN) != 0)
     ;
 
+  mutt_clear_error();
+  
   if (!imap_code (buf))
-  {
     return (-1);
-  }
 
   return 0;
 }