* [PATCH] lib: move call to _n_m_invalidate_metadata
@ 2024-09-01 15:41 David Bremner
0 siblings, 0 replies; only message in thread
From: David Bremner @ 2024-09-01 15:41 UTC (permalink / raw)
To: notmuch
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.
---
lib/message-property.cc | 1 +
lib/message.cc | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/message-property.cc b/lib/message-property.cc
index 7f520340..772437eb 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_STATUS_XAPIAN_EXCEPTION;
diff --git a/lib/message.cc b/lib/message.cc
index 46638f80..94e1bb12 100644
--- a/lib/message.cc
+++ b/lib/message.cc
@@ -719,8 +719,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");
}
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-01 15:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-01 15:41 [PATCH] lib: move call to _n_m_invalidate_metadata David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).