We were correctly ignoring this when adding files, but not when
doing the initial count. Clearly we need better code sharing
here.
if (e == NULL)
break;
- /* Skip these special directories to avoid infinite recursion. */
+ /* Ignore special directories to avoid infinite recursion.
+ * Also ignore the .notmuch directory.
+ */
+ /* XXX: Eventually we'll want more sophistication to let the
+ * user specify files to be ignored. */
if (strcmp (entry->d_name, ".") == 0 ||
- strcmp (entry->d_name, "..") == 0)
+ strcmp (entry->d_name, "..") == 0 ||
+ strcmp (entry->d_name, ".notmuch") == 0)
{
continue;
}