From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2AVJCwYGjGO/egAAbAwnHQ (envelope-from ) for ; Sun, 04 Dec 2022 03:29:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YNFaCgYGjGP4NAEAG6o9tA (envelope-from ) for ; Sun, 04 Dec 2022 03:29:26 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E275B2FD61 for ; Sun, 4 Dec 2022 03:29:25 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 5BF905FBEA; Sun, 4 Dec 2022 02:29:15 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 538145FB4A for ; Sun, 4 Dec 2022 02:29:12 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id BC3865FBC2; Sat, 3 Dec 2022 21:29:11 -0500 (EST) Received: (nullmailer pid 1551662 invoked by uid 1000); Sun, 04 Dec 2022 02:29:09 -0000 From: David Bremner To: Thomas Schneider , notmuch@notmuchmail.org Subject: [PATCH 1/3] lib/database: propagate status code from _notmuch_message_delete Date: Sat, 3 Dec 2022 22:28:55 -0400 Message-Id: <20221204022857.1551514-2-david@tethera.net> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20221204022857.1551514-1-david@tethera.net> References: <20221204022857.1551514-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: IQAKJPTCTB55HIHSELO2IBSVU5PT2O7L X-Message-ID-Hash: IQAKJPTCTB55HIHSELO2IBSVU5PT2O7L 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; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670120965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=/jOiA3LBIPiG1sqCSzBgy0QLUZbA7mQ+hs2jUZ0mHDw=; b=DXUJzUfnCGuICndGywMGbVqLxZ44FAvG+yXPBGqIustnJfkchiZ+PZh+i/VYXda3FhokU2 xdMxKioik5tkje2Z8H67HT5fnG6lmD43+J55I6m4UkTp3xbuYAsXM7XbbwG1f04iMRiaVp VMLphn2qxS31mCWMM7mwaEguAj705P1texfUU1S5lkU0e7gO785x9g4fOXslSYEJn4p0il yQL2IvMHKntpLjc2ACk6TbcFSMJBOBQGr9MXYUFgMPHaFCwYzfJeFCNxtKbxmn0XKXzdH/ TDEpx1K1ixejtU2b/WpevWsdbXEj2/RZCObx6+S6yKOvhYkw7/HrqyG/zLSIFw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670120965; a=rsa-sha256; cv=none; b=sSMAOQNscYGLTBE2XeXjVqN9hwNPiq527OvvbjG/jxb6XcNDrUIZv6p0nYmyc7DJZ6DBQ9 HxqROm0xXEw1ACr3j9JE/BR6p23YQVVAgPms8ymbt3yKz54obUa84d45u4Yohg4V22+3UZ ZWcQPE6sa0y+fWstJ9fFbsoJ//R0w9/AaYkV0xZCqK4HAk9q9l+3BzQ26KEshhVteMnZHw egXvBgMHLpCKSMKkUkyzBNC6Bq4JgQvZhStcyTQzBKFu+nww7Ms9vvGf/Kh3YD3a0GLETg 15BWgTKIL6zyhkT52/GNFgA6ywWZnEj3PBBMU7DaPHqpLBYo0IkHhyUOcZ/CAw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.50 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: E275B2FD61 X-Spam-Score: -1.50 X-Migadu-Scanner: scn1.migadu.com X-TUID: jyYM2amFMp3q _notmuch_message_delete can return (at least) NOTMUCH_STATUS_XAPIAN_EXCEPTION, which we should not ignore. --- lib/database.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/database.cc b/lib/database.cc index c05d70d3..d1e5f1af 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -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); -- 2.35.2