From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8H2qKJJfJV8QXwAA0tVLHw (envelope-from ) for ; Sat, 01 Aug 2020 12:26:58 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id OLJkJJJfJV+fXwAAbx9fmQ (envelope-from ) for ; Sat, 01 Aug 2020 12:26:58 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5DB7B940223 for ; Sat, 1 Aug 2020 12:26:58 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 1DE70294DF; Sat, 1 Aug 2020 08:26:35 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 805AC287B3 for ; Sat, 1 Aug 2020 08:26:24 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 77F695FA66; Sat, 1 Aug 2020 08:26:24 -0400 (EDT) Received: (nullmailer pid 285900 invoked by uid 1000); Sat, 01 Aug 2020 12:26:06 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 10/14] lib: fix return value for n_directory_delete Date: Sat, 1 Aug 2020 09:25:59 -0300 Message-Id: <20200801122603.285803-11-david@tethera.net> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200801122603.285803-1-david@tethera.net> References: <20200801122603.285803-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 3NKKJVNZ6B7VZZMLZAQJRSDLFL5PGMKM X-Message-ID-Hash: 3NKKJVNZ6B7VZZMLZAQJRSDLFL5PGMKM X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: 0.03 X-TUID: OFKoXZYCLZTh Falling out of the catch meant the error return was lost --- lib/directory.cc | 2 +- test/T563-lib-directory.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/directory.cc b/lib/directory.cc index 79ceea31..eee8254e 100644 --- a/lib/directory.cc +++ b/lib/directory.cc @@ -323,7 +323,7 @@ notmuch_directory_delete (notmuch_directory_t *directory) } notmuch_directory_destroy (directory); - return NOTMUCH_STATUS_SUCCESS; + return status; } void diff --git a/test/T563-lib-directory.sh b/test/T563-lib-directory.sh index b91a1c87..7e44e805 100755 --- a/test/T563-lib-directory.sh +++ b/test/T563-lib-directory.sh @@ -76,7 +76,6 @@ test_expect_equal_file EXPECTED OUTPUT backup_database test_begin_subtest "delete directory document for a closed db" -test_subtest_known_broken cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} { stat = notmuch_directory_delete (dir); -- 2.27.0