From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qKW9K84Yl2AgIAAAgWs5BA (envelope-from ) for ; Sun, 09 May 2021 01:03:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id EMVJJ84Yl2D2IQAAB5/wlQ (envelope-from ) for ; Sat, 08 May 2021 23:03:42 +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) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 69E06223B3 for ; Sun, 9 May 2021 01:03:42 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id BAB90271CC; Sat, 8 May 2021 19:03:37 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 3B7011FAC2 for ; Sat, 8 May 2021 19:03:35 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 86B7E60016; Sat, 8 May 2021 19:03:33 -0400 (EDT) Received: (nullmailer pid 3696260 invoked by uid 1000); Sat, 08 May 2021 23:03:32 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH] CLI/new: check status of notmuch_message_maildir_flags_to_tags Date: Sat, 8 May 2021 20:03:28 -0300 Message-Id: <20210508230328.3696212-1-david@tethera.net> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Message-ID-Hash: QPMRLS6EGVWBRHRL6UXGANDYQ3DHB7C5 X-Message-ID-Hash: QPMRLS6EGVWBRHRL6UXGANDYQ3DHB7C5 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-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620515022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=S9hR6XDogLabh/wXNN1kJK8FkQFVx10PI7sC+cYVJXI=; b=qOq1x8PwnQw83Iy4WyySdMZiHjh1GzBsgFJM4eGhPZMIW+AnUFBu/YWjK/DpXwbF144Xpc 5jqICepJDGDHPCCtt0s74IJNd2Xx5r/e3B/7r7Bd16NIPFw20aLk1EvAAL29epCMrCLHmq AqGB4g07xg45NybasiB/IHeWo1R3pxLW74pEji0JMNh7RuuGZAZPHjyOTrCQj7nMRpFJbb 2teBmnEhprkQ1L3g5hUFPPUcXOj77RnmItUXi0xtlkurOXETRbKOhYoG/6TAJ8++eBI5bG 5LfevPPgXEmN1k+GJkABoaPFxkdKXxWtJAL3GokcZdbUUab4T1D7STI6IHrL/g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620515022; a=rsa-sha256; cv=none; b=dyejA5r9XTs5B+6hSrsKiIivxpOXcEG2Hmx9Ow6tnkBVQbWZFNL3K3FgJ3uo+KESJIKOip f5jRX77uHBq2LG31zNmvgZSSf/3WlyP0saz4Cc1Lmv5vr5R5Z3nT9hq+IxkqEvciqEjw9a z1Buj6dSahIPugt+oQ3FMbcGJ1ZJmkbdwlUUf2FSPe/BkY/Yee7LfRuD3bul4cAb5T09zj AmcZQre3cKbvy7TgDDCrFZOesEK6AiIf2lXKzTk2tG9HfdZ8y8bP2bcWopc69H6TrobOyS M9B7o7y8wETqluvd2q752XRWY3rJu/hgzx3rRobHuWpZwOFFDOe1a8Mpdpr3Cw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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-Migadu-Spam-Score: -1.05 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-Migadu-Queue-Id: 69E06223B3 X-Spam-Score: -1.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: LJywFADDryD7 This improves error reporting since it prints the specifics of the exception. --- notmuch-new.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index 1169184f..119aea20 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -404,8 +404,11 @@ add_file (notmuch_database_t *notmuch, const char *filename, break; /* Non-fatal issues (go on to next file). */ case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID: - if (state->synchronize_flags) - notmuch_message_maildir_flags_to_tags (message); + if (state->synchronize_flags) { + status = notmuch_message_maildir_flags_to_tags (message); + if (print_status_message("add_file", message, status)) + goto DONE; + } break; case NOTMUCH_STATUS_FILE_NOT_EMAIL: fprintf (stderr, "Note: Ignoring non-mail file: %s\n", filename); -- 2.30.2