]> git.notmuchmail.org Git - notmuch/commitdiff
lib: clear error message on success in _choose_database_path
authorDavid Bremner <david@tethera.net>
Sun, 3 Dec 2023 18:56:44 +0000 (14:56 -0400)
committerDavid Bremner <david@tethera.net>
Wed, 6 Dec 2023 11:33:05 +0000 (07:33 -0400)
Previously we both found a database and returned a message saying that
the database could not be found (along with a success code). This
change should prevent spurious error output.

lib/open.cc
test/T055-path-config.sh

index 005872dc2c5877d5f0ac483b0ef2cec19b2ca85c..463e38bf0d8f733fe933da033ab993d828255fb7 100644 (file)
@@ -249,6 +249,11 @@ _choose_database_path (notmuch_database_t *notmuch,
        return NOTMUCH_STATUS_NO_DATABASE;
     }
 
+    if (*message) {
+       free (*message);
+       *message = NULL;
+    }
+
     return NOTMUCH_STATUS_SUCCESS;
 }
 
index fcaf09d326b461c7f0b4997e5031c620f548a851..1feb5624c41b8af06fab0750f7bc70395b7a4504 100755 (executable)
@@ -376,7 +376,6 @@ EOF
           ;;
        home_mail|maildir_env)
           test_begin_subtest "No errors from config list ($config)"
-          test_subtest_known_broken
           notmuch config list 2>OUTPUT 1>/dev/null
           test_expect_equal_file /dev/null OUTPUT
           ;;