lib/database: propagate status code from _notmuch_message_delete

_notmuch_message_delete can return (at least)
NOTMUCH_STATUS_XAPIAN_EXCEPTION, which we should not ignore.
This commit is contained in:
David Bremner 2022-12-03 22:28:55 -04:00
parent 891af1d457
commit 16d92abf9f

View file

@ -1456,7 +1456,7 @@ notmuch_database_remove_message (notmuch_database_t *notmuch,
if (status == NOTMUCH_STATUS_SUCCESS && message) { if (status == NOTMUCH_STATUS_SUCCESS && message) {
status = _notmuch_message_remove_filename (message, filename); status = _notmuch_message_remove_filename (message, filename);
if (status == NOTMUCH_STATUS_SUCCESS) if (status == NOTMUCH_STATUS_SUCCESS)
_notmuch_message_delete (message); status = _notmuch_message_delete (message);
else if (status == NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID) else if (status == NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID)
_notmuch_message_sync (message); _notmuch_message_sync (message);