notmuch_message_file_get_header returns "" for missing headers, not NULL

This makes notmuch reply fail to add From: addresses to the list of
recipients.

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2009-11-16 19:57:14 -08:00
parent dac31c9e01
commit 6b135cae1e

View file

@ -236,7 +236,7 @@ notmuch_reply_command (void *ctx, int argc, char *argv[])
recipients = notmuch_message_get_header (message, recipients = notmuch_message_get_header (message,
reply_to_map[i].header); 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, recipients = notmuch_message_get_header (message,
reply_to_map[i].fallback); reply_to_map[i].fallback);