diff options
| author | Kevin Boulain <kevin@boula.in> | 2023-03-29 18:13:32 +0200 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2023-03-30 08:01:09 -0300 |
| commit | fb55ff28a2fdaa9c218af5ca10b1cae674869edd (patch) | |
| tree | f746c06e300eceb71fa3a02d9a7b20f41007a563 /lib/message-property.cc | |
| parent | 336334996750240608d5f29ed5dd8e40a69c4d79 (diff) | |
lib/message-property: sync removed properties to the database
_notmuch_message_remove_all_properties wasn't syncing the message back
to the database but was still invalidating the metadata, giving the
impression the properties had actually been removed.
Also move the metadata invalidation to _notmuch_message_remove_terms
to be closer to what's done in _notmuch_message_modify_property and
_notmuch_message_remove_term.
Diffstat (limited to 'lib/message-property.cc')
| -rw-r--r-- | lib/message-property.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/message-property.cc b/lib/message-property.cc index 0d444bb8..7f520340 100644 --- a/lib/message-property.cc +++ b/lib/message-property.cc @@ -142,7 +142,6 @@ _notmuch_message_remove_all_properties (notmuch_message_t *message, const char * if (status) return status; - _notmuch_message_invalidate_metadata (message, "property"); if (key) term_prefix = talloc_asprintf (message, "%s%s%s", _find_prefix ("property"), key, prefix ? "" : "="); @@ -157,6 +156,9 @@ _notmuch_message_remove_all_properties (notmuch_message_t *message, const char * return NOTMUCH_STATUS_XAPIAN_EXCEPTION; } + if (! _notmuch_message_frozen (message)) + _notmuch_message_sync (message); + return NOTMUCH_STATUS_SUCCESS; } |
