summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Elkins <me@sigpipe.org>2010-08-12 17:08:34 -0700
committerMichael Elkins <me@sigpipe.org>2010-08-12 17:08:34 -0700
commit5e235ae5094c5e0e282c035f271a62eb299b363b (patch)
treebfd2a8bddc7fa4fc5f16d2dd54add6e560b8121a
parent1340e5fcb9ba11235cd48908b10d0dac88e7404c (diff)
always update message body size when parsing a maildir message
-rw-r--r--mh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mh.c b/mh.c
index 2b31cca7..21f516bb 100644
--- a/mh.c
+++ b/mh.c
@@ -659,8 +659,8 @@ static HEADER *maildir_parse_message (int magic, const char *fname,
if (!h->received)
h->received = h->date_sent;
- if (h->content->length <= 0)
- h->content->length = st.st_size - h->content->offset;
+ /* always update the length since we have fresh information available. */
+ h->content->length = st.st_size - h->content->offset;
h->index = -1;