num_entries = scandir (path, &namelist, 0, ino_cmp);
if (num_entries == -1) {
num_entries = scandir (path, &namelist, 0, ino_cmp);
if (num_entries == -1) {
- status = notmuch_database_set_directory_mtime (notmuch, path, path_mtime);
- if (status && ret == NOTMUCH_STATUS_SUCCESS)
- ret = status;
+ if (! interrupted) {
+ status = notmuch_directory_set_mtime (directory, path_mtime);
+ if (status && ret == NOTMUCH_STATUS_SUCCESS)
+ ret = status;
+ }
/* This is the top-level entry point for add_files. It does a couple
* of error checks, sets up the progress-printing timer and then calls
* into the recursive function. */
/* This is the top-level entry point for add_files. It does a couple
* of error checks, sets up the progress-printing timer and then calls
* into the recursive function. */
add_files (notmuch_database_t *notmuch,
const char *path,
add_files_state_t *state)
add_files (notmuch_database_t *notmuch,
const char *path,
add_files_state_t *state)