]> git.cworth.org Git - notmuch/commitdiff
lib: move call to _n_m_invalidate_metadata
authorDavid Bremner <david@tethera.net>
Sun, 1 Sep 2024 15:41:40 +0000 (11:41 -0400)
committerDavid Bremner <david@tethera.net>
Wed, 14 Jan 2026 22:18:24 +0000 (07:18 +0900)
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
lib/message.cc

index f876e5ef880842c58a8b9174545510a1012af43c..588762c01ffc8de039aea6a44237c82319889efd 100644 (file)
@@ -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 ();
index 71723d2ba9aeeea8b39576c53486f9ac1202df49..8b1fa400ed56c61c11b5357abb08dfef08760f11 100644 (file)
@@ -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");
 }