mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 09:24:54 +01:00
Don't hash headers we won't end up using.
Just saving a little work here.
This commit is contained in:
parent
c5eea2b77e
commit
45f0d7bcab
2 changed files with 8 additions and 1 deletions
|
@ -486,6 +486,13 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
|
|||
|
||||
message = notmuch_message_open (filename);
|
||||
|
||||
notmuch_message_restrict_headers (message,
|
||||
"references",
|
||||
"in-reply-to",
|
||||
"message-id",
|
||||
"date",
|
||||
(char *) NULL);
|
||||
|
||||
try {
|
||||
doc = Xapian::Document ();
|
||||
|
||||
|
|
|
@ -241,7 +241,7 @@ notmuch_message_get_header (notmuch_message_t *message,
|
|||
contains = g_hash_table_lookup_extended (message->headers,
|
||||
header_desired, NULL,
|
||||
(gpointer *) &value);
|
||||
if (contains)
|
||||
if (contains && value)
|
||||
return value;
|
||||
|
||||
if (message->parsing_finished)
|
||||
|
|
Loading…
Reference in a new issue