summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b088370)
This reverts commit
9794f19017e028b542ed715bef3fd7cf0da5edff.
The feature makes a lot of sense for the initial import, but it's not
as clear whether it makes sense for ongoing "notmuch new" runs. We
might need to make this opt-in by configuration.
static notmuch_status_t
add_files_recursive (notmuch_database_t *notmuch,
const char *path,
static notmuch_status_t
add_files_recursive (notmuch_database_t *notmuch,
const char *path,
struct stat *st,
add_files_state_t *state)
{
struct stat *st,
add_files_state_t *state)
{
case NOTMUCH_STATUS_SUCCESS:
state->added_messages++;
tag_inbox_and_unread (message);
case NOTMUCH_STATUS_SUCCESS:
state->added_messages++;
tag_inbox_and_unread (message);
- notmuch_message_add_tag (message, tag);
break;
/* Non-fatal issues (go on to next file) */
case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID:
break;
/* Non-fatal issues (go on to next file) */
case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID:
}
}
} else if (S_ISDIR (st->st_mode)) {
}
}
} else if (S_ISDIR (st->st_mode)) {
- if ((strcmp (entry->d_name, "cur") == 0) ||
- (strcmp (entry->d_name, "new") == 0) ||
- (strcmp (entry->d_name, "tmp") == 0)) {
- status = add_files_recursive (notmuch, next, tag, st, state);
- } else {
- status = add_files_recursive (notmuch, next, entry->d_name, st, state);
- }
+ status = add_files_recursive (notmuch, next, st, state);
if (status && ret == NOTMUCH_STATUS_SUCCESS)
ret = status;
}
if (status && ret == NOTMUCH_STATUS_SUCCESS)
ret = status;
}
timerval.it_value.tv_usec = 0;
setitimer (ITIMER_REAL, &timerval, NULL);
timerval.it_value.tv_usec = 0;
setitimer (ITIMER_REAL, &timerval, NULL);
- status = add_files_recursive (notmuch, path, basename(path), &st, state);
+ status = add_files_recursive (notmuch, path, &st, state);
/* Now stop the timer. */
timerval.it_interval.tv_sec = 0;
/* Now stop the timer. */
timerval.it_interval.tv_sec = 0;