Re: notmuch and "mute" -- useful to anyone?
[notmuch-archives.git] / 07 / 9f98a8f4f94cff7aad94ee8a3c87e37ac8c11e
1 Return-Path: <bremner@tethera.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5  by arlo.cworth.org (Postfix) with ESMTP id A94176DE02A7\r
6  for <notmuch@notmuchmail.org>; Tue, 29 Mar 2016 19:10:31 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.021\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.021 tagged_above=-999 required=5\r
12  tests=[AWL=-0.010, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01]\r
13  autolearn=disabled\r
14 Received: from arlo.cworth.org ([127.0.0.1])\r
15  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
16  with ESMTP id 5qiEckSYksBG for <notmuch@notmuchmail.org>;\r
17  Tue, 29 Mar 2016 19:10:22 -0700 (PDT)\r
18 Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
19  by arlo.cworth.org (Postfix) with ESMTPS id B96EA6DE00DF\r
20  for <notmuch@notmuchmail.org>; Tue, 29 Mar 2016 19:10:22 -0700 (PDT)\r
21 Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
22  (envelope-from <bremner@tethera.net>)\r
23  id 1al5ay-0000A8-5w; Tue, 29 Mar 2016 22:10:56 -0400\r
24 Received: (nullmailer pid 32051 invoked by uid 1000);\r
25  Wed, 30 Mar 2016 02:10:18 -0000\r
26 From: David Bremner <david@tethera.net>\r
27 To: notmuch@notmuchmail.org\r
28 Subject: [PATCH 2/2] cli/new: add better error messages for FILE_ERROR\r
29 Date: Tue, 29 Mar 2016 23:10:14 -0300\r
30 Message-Id: <1459303814-31988-3-git-send-email-david@tethera.net>\r
31 X-Mailer: git-send-email 2.8.0.rc3\r
32 In-Reply-To: <1459303814-31988-1-git-send-email-david@tethera.net>\r
33 References: <1459303814-31988-1-git-send-email-david@tethera.net>\r
34 X-BeenThere: notmuch@notmuchmail.org\r
35 X-Mailman-Version: 2.1.20\r
36 Precedence: list\r
37 List-Id: "Use and development of the notmuch mail system."\r
38  <notmuch.notmuchmail.org>\r
39 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
40  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
41 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
42 List-Post: <mailto:notmuch@notmuchmail.org>\r
43 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
44 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
45  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
46 X-List-Received-Date: Wed, 30 Mar 2016 02:10:31 -0000\r
47 \r
48 The code in add_file seems to assume that NOTMUCH_STATUS_FILE_ERROR is\r
49 never returned from add_message. This turns out to be false (although it\r
50 seems to only happen in certain fairly rare race conditions).\r
51 ---\r
52  notmuch-new.c | 4 ++++\r
53  1 file changed, 4 insertions(+)\r
54 \r
55 diff --git a/notmuch-new.c b/notmuch-new.c\r
56 index e503776..04cb5ca 100644\r
57 --- a/notmuch-new.c\r
58 +++ b/notmuch-new.c\r
59 @@ -281,6 +281,10 @@ add_file (notmuch_database_t *notmuch, const char *filename,\r
60         fprintf (stderr, "Note: Ignoring non-mail file: %s\n", filename);\r
61         break;\r
62      /* Fatal issues. Don't process anymore. */\r
63 +    case NOTMUCH_STATUS_FILE_ERROR:\r
64 +       fprintf (stderr, "Unexpected error with file %s\n", filename);\r
65 +       (void) print_status_database ("add_file", notmuch, status);\r
66 +       goto DONE;\r
67      case NOTMUCH_STATUS_READ_ONLY_DATABASE:\r
68      case NOTMUCH_STATUS_XAPIAN_EXCEPTION:\r
69      case NOTMUCH_STATUS_OUT_OF_MEMORY:\r
70 -- \r
71 2.8.0.rc3\r
72 \r