X-Git-Url: https://git.cworth.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-new.c;h=346e64697aaf02763a38eb09e93ef428348aae4a;hp=5b8fa340f598e6af5ed19942dd3034fed3f28671;hb=6472dbf4b7fdec3bd59d7622ef477a035e34c67a;hpb=fd6d50b38f8d8529191f6c9b637ecb458018baa3 diff --git a/notmuch-new.c b/notmuch-new.c index 5b8fa340..346e6469 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -601,11 +601,12 @@ add_files (notmuch_database_t *notmuch, continue; } - /* Ignore the .notmuch directory and any "tmp" directory + /* Ignore any top level .notmuch directory and any "tmp" directory * that appears within a maildir. */ if ((is_maildir && strcmp (entry->d_name, "tmp") == 0) || - strcmp (entry->d_name, ".notmuch") == 0) + (strcmp (entry->d_name, ".notmuch") == 0 + && (strcmp (path, state->mail_root)) == 0)) continue; next = talloc_asprintf (notmuch, "%s/%s", path, entry->d_name);