X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-new.c;h=c43457053dd1f36f9aea5109904b6a2ed9a2c8af;hp=5b8fa340f598e6af5ed19942dd3034fed3f28671;hb=HEAD;hpb=f9d8f9c6bae1a9ea60b41755008b71381464e208 diff --git a/notmuch-new.c b/notmuch-new.c index 5b8fa340..4a53e3eb 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -413,6 +413,10 @@ add_file (notmuch_database_t *notmuch, const char *filename, case NOTMUCH_STATUS_FILE_NOT_EMAIL: fprintf (stderr, "Note: Ignoring non-mail file: %s\n", filename); break; + case NOTMUCH_STATUS_PATH_ERROR: + fprintf (stderr, "Note: Ignoring non-indexable path: %s\n", filename); + (void) print_status_database ("add_file", notmuch, status); + break; case NOTMUCH_STATUS_FILE_ERROR: /* Someone renamed/removed the file between scandir and now. */ state->vanished_files++; @@ -601,11 +605,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);