]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-new.c
Don't create "contact" terms in the database.
[notmuch] / notmuch-new.c
index 7603d3d7b57f0a61236cef9f76afe5e8bd98740e..6247088ac130067457d74eb1c7b4d7222ea42513 100644 (file)
@@ -167,7 +167,7 @@ add_files_recursive (notmuch_database_t *notmuch,
        if (S_ISREG (st->st_mode)) {
            /* If the file hasn't been modified since the last
             * add_files, then we need not look at it. */
-           if (st->st_mtime > path_dbtime) {
+           if (path_dbtime == 0 || st->st_mtime > path_dbtime) {
                state->processed_files++;
 
                status = notmuch_database_add_message (notmuch, next, &message);
@@ -410,6 +410,7 @@ notmuch_new_command (void *ctx,
 
     if (new_database) {
        int count;
+       count = 0;
        count_files (db_path, &count);
        add_files_state.ignore_read_only_directories = FALSE;
        add_files_state.total_files = count;