From b268c8c0711a12b26a3abd3c8dde38a3679999b1 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 19 Jul 2020 09:51:03 -0300 Subject: [PATCH] lib: fix error return bug with n_d_set_config. 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 | 2 +- test/T562-lib-database.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/config.cc b/lib/config.cc index 292f0288..20036471 100644 --- a/lib/config.cc +++ b/lib/config.cc @@ -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 diff --git a/test/T562-lib-database.sh b/test/T562-lib-database.sh index cdc6fc12..f767fddf 100755 --- a/test/T562-lib-database.sh +++ b/test/T562-lib-database.sh @@ -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)); -- 2.43.0