mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 09:24:54 +01:00
notmuch: Ignore .notmuch when counting files.
We were correctly ignoring this when adding files, but not when doing the initial count. Clearly we need better code sharing here.
This commit is contained in:
parent
10c176ba0e
commit
9bc4253fa8
1 changed files with 7 additions and 2 deletions
|
@ -253,9 +253,14 @@ count_files (const char *path, int *count)
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue