1 Return-Path: <amdragon@mit.edu>
\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 077D9431FAE
\r
6 for <notmuch@notmuchmail.org>; Sat, 9 Jun 2012 12:14:58 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id xIwGjTgjJGXe for <notmuch@notmuchmail.org>;
\r
16 Sat, 9 Jun 2012 12:14:57 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 646DB431FBF
\r
20 for <notmuch@notmuchmail.org>; Sat, 9 Jun 2012 12:14:55 -0700 (PDT)
\r
21 X-AuditID: 12074424-b7f826d000000926-39-4fd3a0ae72db
\r
22 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])
\r
23 by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id FF.16.02342.EA0A3DF4; Sat, 9 Jun 2012 15:14:54 -0400 (EDT)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q59JErsL015442;
\r
27 Sat, 9 Jun 2012 15:14:53 -0400
\r
28 Received: from drake.dyndns.org
\r
29 (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com
\r
30 [209.6.116.242]) (authenticated bits=0)
\r
31 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
32 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q59JEq3g026106
\r
33 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
34 Sat, 9 Jun 2012 15:14:53 -0400 (EDT)
\r
35 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)
\r
36 (envelope-from <amdragon@mit.edu>)
\r
37 id 1SdR75-0000wt-Nq; Sat, 09 Jun 2012 15:14:19 -0400
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [PATCH v2 3/5] lib: Only synchronize maildir flags for messages in
\r
42 Date: Sat, 9 Jun 2012 15:14:16 -0400
\r
43 Message-Id: <1339269258-3542-4-git-send-email-amdragon@mit.edu>
\r
44 X-Mailer: git-send-email 1.7.10
\r
45 In-Reply-To: <1339269258-3542-1-git-send-email-amdragon@mit.edu>
\r
46 References: <1338742656-11640-1-git-send-email-amdragon@mit.edu>
\r
47 <1339269258-3542-1-git-send-email-amdragon@mit.edu>
\r
48 X-Brightmail-Tracker:
\r
49 H4sIAAAAAAAAA+NgFtrDIsWRmVeSWpSXmKPExsUixCmqrLtuwWV/g6vHjC2apjtbXL85k9mB
\r
50 yePW/dfsHs9W3WIOYIrisklJzcksSy3St0vgyjiwcS57wUvuitn9P9gbGA9zdjFyckgImEi0
\r
51 3fzFCmGLSVy4t56ti5GLQ0hgH6PEr2v3GCGc9YwSj/ecYoZwHjJJ9O5ohSqbyyjxovU3O0g/
\r
52 m4CGxLb9yxlBbBEBaYmdd2cDzeXgYBYwl7jZEgcSFhYIkXj96ANYCYuAqsTpc5fYQGxeAXuJ
\r
53 u+37oc6Ql3h6vw8szingIPHs+3SweiGBMolnp2ezTWDkX8DIsIpRNiW3Sjc3MTOnODVZtzg5
\r
54 MS8vtUjXXC83s0QvNaV0EyMokNhdVHYwNh9SOsQowMGoxMOrJX/JX4g1say4MvcQoyQHk5Io
\r
55 75f5l/2F+JLyUyozEosz4otKc1KLDzFKcDArifBuZQIq501JrKxKLcqHSUlzsCiJ86ZynfUX
\r
56 EkhPLEnNTk0tSC2CycpwcChJ8DIBI0ZIsCg1PbUiLTOnBCHNxMEJMpwHaPgbkMW8xQWJucWZ
\r
57 6RD5U4yKUuK830ESAiCJjNI8uF5YpL9iFAd6RZj3J0gVDzBJwHW/AhrMBDS4NeoCyOCSRISU
\r
58 VANjWG9CUbzB5pz57/OPV3+b/3T+W6fXVyZM+L3P/vScGWbaJicXRz/dMf/PiqszrQ9/3F6o
\r
59 lXm8dNPn+kjrR2maqs536mUDCwU5clbmzxNIPPCtr1TiodeTwsNbD5+Zb8fTHdv5dY7S2Xbm
\r
60 uDDr0yXvVN4pqh/lf7o8TePlZhvOev2vKy1LQ4LilFiKMxINtZiLihMBb3nB6s8CAAA=
\r
61 X-BeenThere: notmuch@notmuchmail.org
\r
62 X-Mailman-Version: 2.1.13
\r
64 List-Id: "Use and development of the notmuch mail system."
\r
65 <notmuch.notmuchmail.org>
\r
66 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
67 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
68 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
69 List-Post: <mailto:notmuch@notmuchmail.org>
\r
70 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
71 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
72 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
73 X-List-Received-Date: Sat, 09 Jun 2012 19:14:58 -0000
\r
75 Previously, we synchronized flags to tags for any message that looked
\r
76 like it had maildir flags in its file name, regardless of whether it
\r
77 was in a maildir-like directory structure. This was asymmetric with
\r
78 tag-to-flag synchronization, which only applied to messages in
\r
79 directories named new/ and cur/ (introduced by 95dd5fe5).
\r
81 This change makes our interpretation stricter and addresses this
\r
82 asymmetry by only synchronizing flags to tags for messages in
\r
83 directories named new/ or cur/. It also prepares us to treat messages
\r
84 in new/ as maildir messages, even though they lack maildir flags.
\r
86 lib/message.cc | 6 +++++-
\r
87 1 file changed, 5 insertions(+), 1 deletion(-)
\r
89 diff --git a/lib/message.cc b/lib/message.cc
\r
90 index ed96477..bbac2ff 100644
\r
91 --- a/lib/message.cc
\r
92 +++ b/lib/message.cc
\r
93 @@ -1074,7 +1074,7 @@ notmuch_message_maildir_flags_to_tags (notmuch_message_t *message)
\r
95 notmuch_status_t status;
\r
96 notmuch_filenames_t *filenames;
\r
97 - const char *filename;
\r
98 + const char *filename, *dir;
\r
99 char *combined_flags = talloc_strdup (message, "");
\r
101 int seen_maildir_info = 0;
\r
102 @@ -1084,6 +1084,10 @@ notmuch_message_maildir_flags_to_tags (notmuch_message_t *message)
\r
103 notmuch_filenames_move_to_next (filenames))
\r
105 filename = notmuch_filenames_get (filenames);
\r
106 + dir = _filename_is_in_maildir (filename);
\r
111 flags = strstr (filename, ":2,");
\r