]> git.notmuchmail.org Git - notmuch/commitdiff
lib/database: propagate status code from _notmuch_message_delete
authorDavid Bremner <david@tethera.net>
Sun, 4 Dec 2022 02:28:55 +0000 (22:28 -0400)
committerDavid Bremner <david@tethera.net>
Tue, 27 Dec 2022 15:59:29 +0000 (11:59 -0400)
_notmuch_message_delete can return (at least)
NOTMUCH_STATUS_XAPIAN_EXCEPTION, which we should not ignore.

lib/database.cc

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