aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-11-20 19:31:00 +0100
committerGravatar Carl Worth <cworth@cworth.org>2009-11-20 19:36:01 +0100
commit52292c548512214fd3dd205edb4ca9cf7955f2b3 (patch)
tree2c02877ef39fc870aea34283672c8671705f227c /lib
parent5d0a01dceb67e9bdcb95bcb2328baef5e7ea7d52 (diff)
add_message: Properly handle missing Message-ID once again.
There's been a fair amount of fallout from when we changed message_file_get_header from returning NULL to returning "" for missing headers. This is yet more fallout from that, (where we were accepting an empty message-ID rather than generating one like we want to).
Diffstat (limited to 'lib')
-rw-r--r--lib/database.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/database.cc b/lib/database.cc
index 726c5a98..294247e2 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -908,7 +908,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
* is to find a message ID (or else create one ourselves). */
header = notmuch_message_file_get_header (message_file, "message-id");
- if (header) {
+ if (header && *header != '\0') {
message_id = _parse_message_id (message_file, header, NULL);
/* So the header value isn't RFC-compliant, but it's
* better than no message-id at all. */