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);
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;