X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fmessage.cc;h=f8215a49f7dc93b482fb1d309b5ce8c68d6ba2f3;hb=d877240f4e097eb3dd477409a24155c10e0b3c17;hp=36a07a8890b0dd52a092fc8c88434676cc4193be;hpb=06adc276682d1d5f73d78df2e898ad4191eb4499;p=notmuch diff --git a/lib/message.cc b/lib/message.cc index 36a07a88..f8215a49 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -1034,10 +1034,16 @@ _notmuch_message_set_header_values (notmuch_message_t *message, /* GMime really doesn't want to see a NULL date, so protect its * sensibilities. */ - if (date == NULL || *date == '\0') + if (date == NULL || *date == '\0') { time_value = 0; - else + } else { time_value = g_mime_utils_header_decode_date (date, NULL); + /* + * Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=779923 + */ + if (time_value < 0) + time_value = 0; + } message->doc.add_value (NOTMUCH_VALUE_TIMESTAMP, Xapian::sortable_serialise (time_value)); @@ -1123,7 +1129,7 @@ _notmuch_message_delete (notmuch_message_t *message) query = notmuch_query_create (notmuch, query_string); if (query == NULL) return NOTMUCH_STATUS_OUT_OF_MEMORY; - status = notmuch_query_count_messages_st (query, &count); + status = notmuch_query_count_messages (query, &count); if (status) { notmuch_query_destroy (query); return status;