From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4B67F431FBC for ; Mon, 15 Feb 2010 00:13:37 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.688 X-Spam-Level: X-Spam-Status: No, score=-0.688 tagged_above=-999 required=5 tests=[AWL=-0.689, BAYES_50=0.001] autolearn=ham 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 ti8uNfJDBVd7 for ; Mon, 15 Feb 2010 00:13:36 -0800 (PST) Received: from kaylee.flamingspork.com (kaylee.flamingspork.com [74.207.245.61]) by olra.theworths.org (Postfix) with ESMTP id 8F9E3431FAE for ; Mon, 15 Feb 2010 00:13:36 -0800 (PST) Received: from willster (localhost [127.0.0.1]) by kaylee.flamingspork.com (Postfix) with ESMTPS id ADA646393; Mon, 15 Feb 2010 08:10:36 +0000 (UTC) Received: from flamingspork.com (localhost.localdomain [127.0.0.1]) by willster (Postfix) with ESMTPS id 8569E1023DAE; Mon, 15 Feb 2010 19:13:33 +1100 (EST) Date: Mon, 15 Feb 2010 19:13:31 +1100 From: Stewart Smith To: Tim Stoakes Message-ID: <20100215081331.GD22402@flamingspork.com> References: <87y6lz39nd.fsf@yoom.home.cworth.org> <20091121221207.GB17268@jukie.net> <9cce5525b093b87fe74d427954ffad89@localhost> <87d43b2oif.fsf@yoom.home.cworth.org> <9bfdedddeab9c58cd45d8d448323d0fc@localhost> <87skc23327.fsf@yoom.home.cworth.org> <4b0eef22.JwxdgTGElffx149F%michiel@michielbuddingh.net> <87ws1bjpmm.fsf@yoom.home.cworth.org> <878wdfkhcl.fsf@aegir.org.uk> <20100210031339.GH16686@mail.rocksoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100210031339.GH16686@mail.rocksoft.com> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: notmuch@notmuchmail.org Subject: Re: [PATCH] notmuch: Respect maildir message flags 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: Mon, 15 Feb 2010 08:13:37 -0000 On Wed, Feb 10, 2010 at 01:43:39PM +1030, Tim Stoakes wrote: > My apologies for dredging up an old thread. I don't want to restart the > religious war over whether notmuch should respect Maildir flags - > suffice to say that *I* want that, and the patch posted by Michiel > seemed to be the best way to make that happen. I want this too :) I also found a bug.... > @@ -301,6 +357,28 @@ add_files_recursive (notmuch_database_t *notmuch, > continue; > } > > + /* If this directory is a Maildir folder, we need to > + * ignore any subdirectories marked tmp/, and scan for > + * Maildir attributes on messages contained in the sub- > + * directories 'new' and 'cur'. */ > + if (maildir_detected != 0 && > + entry->d_type == DT_DIR && > + ((strcmp (entry->d_name, "tmp") == 0) || > + (strcmp (entry->d_name, "new") == 0) || > + (strcmp (entry->d_name, "cur") == 0))) { should be (entry->d_type == DT_DIR || entry->d_type == DT_UNKNOWN) && as not everywhere is going to give you d_type (e.g. my machine). (took me a while to find/figure that out :) -- Stewart Smith