[PATCH] Skip dot files in `notmuch new`
James Vasile
james at hackervisions.org
Tue Aug 23 17:11:53 PDT 2011
No known mail client or fetch tool stores mail in dot files, because
files that start with '.' are usually used to store metadata
(i.e. state or configuration) as opposed to subject-matter data.
Some mail fetch tools (including mbsync) and clients use dot files in
maildirs to store metadata. Notmuch should not warn that it is
ignoring these files, since it *should* ignore them. Indeed, it
should ignore all dot files.
---
notmuch-new.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/notmuch-new.c b/notmuch-new.c
index 7d17793..87ee07e 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -428,6 +428,10 @@ add_files_recursive (notmuch_database_t *notmuch,
continue;
}
+ /* Don't add dot files. */
+ if (entry->d_name[0] == '.')
+ continue;
+
/* We're now looking at a regular file that doesn't yet exist
* in the database, so add it. */
next = talloc_asprintf (notmuch, "%s/%s", path, entry->d_name);
--
1.7.5.4
More information about the notmuch
mailing list