aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2024-09-01 11:41:40 -0400
committerDavid Bremner <david@tethera.net>2026-01-15 07:18:24 +0900
commit8f9e16f2b9a46bef2c7398a27ff29db7bb23ee8d (patch)
treebe9380b46047212c63c15a804b2ec5ffd080946c
parent0469bcd1baf94548a4157effced6fee3a2f23cc6 (diff)
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.
-rw-r--r--lib/message-property.cc1
-rw-r--r--lib/message.cc2
2 files changed, 1 insertions, 2 deletions
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");
}