]> git.notmuchmail.org Git - notmuch/commitdiff
lib: fix error return bug with n_d_set_config.
authorDavid Bremner <david@tethera.net>
Sun, 19 Jul 2020 12:51:03 +0000 (09:51 -0300)
committerDavid Bremner <david@tethera.net>
Wed, 22 Jul 2020 22:52:55 +0000 (19:52 -0300)
The catch block either needs to return, or the function needs to
return "status". Choose the latter for consistency with
n_d_get_config.

lib/config.cc
test/T562-lib-database.sh

index 292f0288d7ef2f95e171efe9bf63b4bd8fe42c64..200364715a634bb6c469c88a1d4ef2d650820e12 100644 (file)
@@ -60,7 +60,7 @@ notmuch_database_set_config (notmuch_database_t *notmuch,
        _notmuch_database_log (notmuch, "Error: A Xapian exception occurred setting metadata: %s\n",
                               error.get_msg ().c_str ());
     }
-    return NOTMUCH_STATUS_SUCCESS;
+    return status;
 }
 
 static notmuch_status_t
index cdc6fc1238375535786638109b0e0954da81b1bc..f767fddfa1a4086bddef833dcaca115b45f16d5b 100755 (executable)
@@ -357,7 +357,6 @@ EOF
 test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "set config in closed database"
-test_subtest_known_broken
 cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
     {
         EXPECT0(notmuch_database_close (db));