[notmuch] [PATCH] d_type fix

Carl Worth cworth at cworth.org
Fri Jan 22 21:48:35 PST 2010


On Thu, 21 Jan 2010 15:10:18 -0500, Geo Carncross <geocar-notmuch at internetconnection.net> wrote:
> A review of notmuch-new.c shows three uses of ->d_type:

Excellent, thank you.

> Near line 153, in _entries_resemble_maildir() we can simply allow for
> DT_UNKNOWN. This would fail if people have MH-style folders which have
> three folders called "new" "cur" and "tmp", but that seems unlikely, in
> which case the "tmp" folder would simply not be scanned.

The check will also fail if someone happens to have two regular files
named "cur" and "new" next to a directory named "tmp", (which would then
be ignored). But I agree this seems very unlikely.

> [snip]

The rest of your analysis looks good to me. And it's nice to see how
simple the final patch is.

> Attached is a patch which was tested with reiserfs. It should also work
> with xfs.

I had been waiting to apply the previous patch until I could test it on
a filesystem returning DT_UNKNOWN. But this one looks clean enough to
apply immediately.

One thing that would have made that easier would be a commit message,
(such as making a commit with "git commit" then using "git format-patch"
and "git send-email" to send it). But I'll go ahead and make one up.

Thanks again!

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20100123/8c0929c8/attachment.pgp>


More information about the notmuch mailing list