From: David Bremner Date: Sun, 1 Sep 2024 15:41:40 +0000 (-0400) Subject: lib: move call to _n_m_invalidate_metadata X-Git-Tag: 0.40_rc0~8 X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=8f9e16f2b9a46bef2c7398a27ff29db7bb23ee8d;p=notmuch lib: move call to _n_m_invalidate_metadata It is wrong most of the time in _notmuch_message_remove_terms, but that function is too low level to know how to call _n_m_invalidate_metadata with the right argument, at least not without more extensive changes. This change merely makes the current behaviour more obvious, since the other calls cannot have relied on metadata being invalidated. --- diff --git a/lib/message-property.cc b/lib/message-property.cc index f876e5ef..588762c0 100644 --- a/lib/message-property.cc +++ b/lib/message-property.cc @@ -151,6 +151,7 @@ _notmuch_message_remove_all_properties (notmuch_message_t *message, const char * try { /* XXX better error reporting ? */ _notmuch_message_remove_terms (message, term_prefix); + _notmuch_message_invalidate_metadata (message, "property"); } catch (Xapian::Error &error) { LOG_XAPIAN_EXCEPTION (message, error); return _notmuch_xapian_error (); diff --git a/lib/message.cc b/lib/message.cc index 71723d2b..8b1fa400 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -723,8 +723,6 @@ _notmuch_message_remove_terms (notmuch_message_t *message, const char *prefix) /* Ignore failure to remove non-existent term. */ } } - - _notmuch_message_invalidate_metadata (message, "property"); }