]> git.notmuchmail.org Git - notmuch/commitdiff
notmuch_message_file_get_header returns "" for missing headers, not NULL
authorKeith Packard <keithp@keithp.com>
Tue, 17 Nov 2009 03:57:14 +0000 (19:57 -0800)
committerKeith Packard <keithp@keithp.com>
Tue, 17 Nov 2009 06:10:36 +0000 (22:10 -0800)
This makes notmuch reply fail to add From: addresses to the list of
recipients.

Signed-off-by: Keith Packard <keithp@keithp.com>
notmuch-reply.c

index d734de39c1da5be3b91b214d05d72b7e76ea9f3c..4a4a782b1636a269aa505f8b560f06eaa2cd337c 100644 (file)
@@ -236,7 +236,7 @@ notmuch_reply_command (void *ctx, int argc, char *argv[])
 
            recipients = notmuch_message_get_header (message,
                                                     reply_to_map[i].header);
 
            recipients = notmuch_message_get_header (message,
                                                     reply_to_map[i].header);
-           if (recipients == NULL && reply_to_map[i].fallback)
+           if ((recipients == NULL || recipients[0] == '\0') && reply_to_map[i].fallback)
                recipients = notmuch_message_get_header (message,
                                                         reply_to_map[i].fallback);
 
                recipients = notmuch_message_get_header (message,
                                                         reply_to_map[i].fallback);