[notmuch] [PATCH] notmuch: Respect maildir message flags

Stewart Smith stewart at flamingspork.com
Mon Feb 15 00:13:31 PST 2010


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


More information about the notmuch mailing list