Re: [notmuch] [PATCH] notmuch-new: Test if directory looks like Maildir before skipping tmp.

Subject: Re: [notmuch] [PATCH] notmuch-new: Test if directory looks like Maildir before skipping tmp.

Date: Fri, 27 Nov 2009 19:41:36 -0800

To: Jan Janak, notmuch@notmuchmail.org

Cc:

From: Carl Worth


On Wed, 25 Nov 2009 22:11:45 +0100, Jan Janak <jan@ryngle.com> wrote:
> Files and subdirectories with the name "tmp" that do not look like
> Maildir will still be processed by 'notmuch new'.

This is a nice improvement. I realize we neglected to document the
original "tmp" skipping. This should definitely be safer, (though we
should document this as well).

And this maildir detection will also be useful for the outstanding patch
to add tags based on flags in maildir filenames.

I pushed the patch and then made two, minor whitespace fixes:

> +static int is_maildir (struct dirent **entries, int count)

The function name in the definition here belongs on its own line.

> +	    if (found == 3) return 1;

Having the action of the "if" statement on the same line as the "if"
itself hides it too much. That also belongs on the next line.

-Carl

Thread: