diff options
author | Carl Worth <cworth@cworth.org> | 2009-10-19 12:52:46 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-10-19 12:52:46 -0700 |
commit | 9bc4253fa804b62ff31e8de82a139b2cb12b118f (patch) | |
tree | bfa46037f10e31a0feefd28cbfbc601d6b052620 /notmuch.c | |
parent | 10c176ba0e6d71e920b72a3165c0e56f26b5e4b3 (diff) |
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.
Diffstat (limited to 'notmuch.c')
-rw-r--r-- | notmuch.c | 9 |
1 files changed, 7 insertions, 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; } |