Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 96CD9431FC9 for ; Sun, 3 Jun 2012 09:58:15 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C+5GBi3bDK0Z for ; Sun, 3 Jun 2012 09:58:14 -0700 (PDT) Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU [18.7.68.34]) by olra.theworths.org (Postfix) with ESMTP id A6C4C431FAF for ; Sun, 3 Jun 2012 09:58:14 -0700 (PDT) X-AuditID: 12074422-b7f1f6d00000090b-65-4fcb97a6d750 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP id A7.47.02315.6A79BCF4; Sun, 3 Jun 2012 12:58:14 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q53GwEBT012637; Sun, 3 Jun 2012 12:58:14 -0400 Received: from drake.dyndns.org (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com [209.6.116.242]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q53GwDMh004206 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Sun, 3 Jun 2012 12:58:13 -0400 (EDT) Received: from amthrax by drake.dyndns.org with local (Exim 4.77) (envelope-from ) id 1SbE7k-00037x-7R; Sun, 03 Jun 2012 12:57:52 -0400 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH 3/4] lib: Only synchronize maildir flags for messages in maildirs Date: Sun, 3 Jun 2012 12:57:35 -0400 Message-Id: <1338742656-11640-4-git-send-email-amdragon@mit.edu> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1338742656-11640-1-git-send-email-amdragon@mit.edu> References: <1338742656-11640-1-git-send-email-amdragon@mit.edu> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrIIsWRmVeSWpSXmKPExsUixCmqrLts+ml/gzWXFSyu35zJ7MDo8WzV LeYAxigum5TUnMyy1CJ9uwSujO2nlQp62Svu/bjL2MB4gbWLkZNDQsBE4tS3U8wQtpjEhXvr 2boYuTiEBPYxStzfMJMRwlnPKHFu/xUWCOchk8Sbt6+YIZy5jBLXV1xiA+lnE9CQ2LZ/OSOI LSIgLbHz7mygHRwczAJqEn+6VEDCwgKBEsvmbQRbzSKgKnGs4QJYOa+Ag8Tnq3+YIM6Ql3h6 v48NpJVTwFGi94AJSFgIqORDwxX2CYz8CxgZVjHKpuRW6eYmZuYUpybrFicn5uWlFuma6uVm luilppRuYgSFDLuL0g7GnweVDjEKcDAq8fB+mnXKX4g1say4MvcQoyQHk5Io77Spp/2F+JLy UyozEosz4otKc1KLDzFKcDArifB22gHleFMSK6tSi/JhUtIcLErivGs0d/sLCaQnlqRmp6YW pBbBZGU4OJQkeM9PA2oULEpNT61Iy8wpQUgzcXCCDOcBGg5Ww1tckJhbnJkOkT/FqCglznsN JCEAksgozYPrhcX0K0ZxoFeEeV+CVPEA0wFc9yugwUxAgw0OnwQZXJKIkJJqYEw/ufbMi++M CREri95ZzJzafWquWHulTnrsMSG2i8/WZ99tNGiwtDt+XYQzW2ODcqBg4CEuQYHp4XvaLTjs 3jd97s1uP3R+343edK9ZMlEXBLfuvNQxUX/u3Zv5P1smJs/9tPvjMrVZBwRLakJO3J/Ll/c1 VURsa4VpLfu9e5csy589e/ftZakSS3FGoqEWc1FxIgCHwv7QxAIAAA== X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2012 16:58:15 -0000 --- lib/message.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/message.cc b/lib/message.cc index ed96477..bbac2ff 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -1074,7 +1074,7 @@ notmuch_message_maildir_flags_to_tags (notmuch_message_t *message) const char *flags; notmuch_status_t status; notmuch_filenames_t *filenames; - const char *filename; + const char *filename, *dir; char *combined_flags = talloc_strdup (message, ""); unsigned i; int seen_maildir_info = 0; @@ -1084,6 +1084,10 @@ notmuch_message_maildir_flags_to_tags (notmuch_message_t *message) notmuch_filenames_move_to_next (filenames)) { filename = notmuch_filenames_get (filenames); + dir = _filename_is_in_maildir (filename); + + if (! dir) + continue; flags = strstr (filename, ":2,"); if (! flags) -- 1.7.10