aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/message.cc
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-11-20 21:46:37 +0100
committerGravatar Carl Worth <cworth@cworth.org>2009-11-20 21:46:37 +0100
commit3ae12b1e286d1c0041a2e3957cb01daa2981dad9 (patch)
tree156699c0a9cc0f62cb9ef533e5b791efd9235b4a /lib/message.cc
parent656e4c413d84984dcc5fbd8016907ed03c343cb8 (diff)
add_message: Re-fix handling of non-mail files.
More fallout from _get_header now returning "" for missing headers. The bug here is that we would no longer detect that a file is not an email message and give up on it like we should. And this time, I actually audited all callers to notmuch_message_get_header, so hopefully we're done fixing this bug over and over.
Diffstat (limited to 'lib/message.cc')
-rw-r--r--lib/message.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/message.cc b/lib/message.cc
index 41dddd07..e0b8a8e1 100644
--- a/lib/message.cc
+++ b/lib/message.cc
@@ -491,7 +491,7 @@ _notmuch_message_set_date (notmuch_message_t *message,
/* GMime really doesn't want to see a NULL date, so protect its
* sensibilities. */
- if (date == NULL)
+ if (date == NULL || *date == '\0')
time_value = 0;
else
time_value = g_mime_utils_header_decode_date (date, NULL);