Re: [PATCH 9/9] add has: query prefix to search for specific properties
[notmuch-archives.git] / 03 / 95789481e281d1cc8f4f96343ef06fbc6c29eb
1 Return-Path: <jrollins@servo.finestructure.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 olra.theworths.org (Postfix) with ESMTP id 323F6431FD0\r
6         for <notmuch@notmuchmail.org>; Fri,  3 Jun 2011 10:01:18 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.921\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.921 tagged_above=-999 required=5\r
12         tests=[NO_DNS_FOR_FROM=0.379, RCVD_IN_DNSWL_MED=-2.3]\r
13         autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id bZRU4z-6Kbm3 for <notmuch@notmuchmail.org>;\r
17         Fri,  3 Jun 2011 10:01:16 -0700 (PDT)\r
18 Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
19         [131.215.239.19])\r
20         by olra.theworths.org (Postfix) with ESMTP id C450D431FB6\r
21         for <notmuch@notmuchmail.org>; Fri,  3 Jun 2011 10:01:16 -0700 (PDT)\r
22 Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
23         by earth-doxen-postvirus (Postfix) with ESMTP id 0FAC066E021C;\r
24         Fri,  3 Jun 2011 10:01:15 -0700 (PDT)\r
25 X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new\r
26 Received: from servo.finestructure.net (cpe-98-149-172-122.socal.res.rr.com\r
27         [98.149.172.122]) (Authenticated sender: jrollins)\r
28         by earth-doxen-submit (Postfix) with ESMTP id 198D966E01EB;\r
29         Fri,  3 Jun 2011 10:01:08 -0700 (PDT)\r
30 Received: by servo.finestructure.net (Postfix, from userid 1000)\r
31         id A1EFBAD6; Fri,  3 Jun 2011 10:01:08 -0700 (PDT)\r
32 From: Jameson Graef Rollins <jrollins@finestructure.net>\r
33 To: Notmuch Mail <notmuch@notmuchmail.org>\r
34 Subject: [PATCH] Do not attept to output part raw if part is not GMimePart.\r
35 Date: Fri,  3 Jun 2011 10:01:06 -0700\r
36 Message-Id: <1307120466-4980-1-git-send-email-jrollins@finestructure.net>\r
37 X-Mailer: git-send-email 1.7.4.4\r
38 In-Reply-To: <1307032735-27427-1-git-send-email-jrollins@finestructure.net>\r
39 References: <1307032735-27427-1-git-send-email-jrollins@finestructure.net>\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.13\r
42 Precedence: list\r
43 List-Id: "Use and development of the notmuch mail system."\r
44         <notmuch.notmuchmail.org>\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
48 List-Post: <mailto:notmuch@notmuchmail.org>\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
52 X-List-Received-Date: Fri, 03 Jun 2011 17:01:18 -0000\r
53 \r
54 This was a minor oversite in checking of part type when outputing\r
55 content raw.  This was causing gmime was to throw an exception to\r
56 stderr.\r
57 \r
58 Unfortunately the gmime exception was not being caught by notmuch, or\r
59 the test suite.  I'm not sure if notmuch should have done anything in\r
60 this case, but certainly the test suite should be capable of detecting\r
61 that something unexpected was output to stderr.\r
62 ---\r
63 This is a cleaner version of this patch.\r
64 \r
65  notmuch-show.c |    3 +++\r
66  1 files changed, 3 insertions(+), 0 deletions(-)\r
67 \r
68 diff --git a/notmuch-show.c b/notmuch-show.c\r
69 index 9267d02..59f7078 100644\r
70 --- a/notmuch-show.c\r
71 +++ b/notmuch-show.c\r
72 @@ -644,6 +644,9 @@ format_part_end_json (GMimeObject *part)\r
73  static void\r
74  format_part_content_raw (GMimeObject *part)\r
75  {\r
76 +    if (! GMIME_IS_PART (part))\r
77 +       return;\r
78 +\r
79      GMimeStream *stream_stdout;\r
80      GMimeStream *stream_filter = NULL;\r
81      GMimeDataWrapper *wrapper;\r
82 -- \r
83 1.7.4.4\r
84 \r