X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-new.c;h=b734e5b972373d6b4941b8c711cf99f87056b097;hp=7d17793b2f382c5102f092a6e9173966286fa724;hb=bdaee77e1b0853b0dab00565e4c5b6164248f85a;hpb=73ed66a501537fc145b6b6250513ec94c7b7e659 diff --git a/notmuch-new.c b/notmuch-new.c index 7d17793b..b734e5b9 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -868,7 +868,7 @@ notmuch_new_command (void *ctx, int argc, char *argv[]) removed_files = 0; renamed_files = 0; gettimeofday (&tv_start, NULL); - for (f = add_files_state.removed_files->head; f; f = f->next) { + for (f = add_files_state.removed_files->head; f && !interrupted; f = f->next) { status = notmuch_database_remove_message (notmuch, f->filename); if (status == NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID) renamed_files++; @@ -883,7 +883,7 @@ notmuch_new_command (void *ctx, int argc, char *argv[]) } gettimeofday (&tv_start, NULL); - for (f = add_files_state.removed_directories->head, i = 0; f; f = f->next, i++) { + for (f = add_files_state.removed_directories->head, i = 0; f && !interrupted; f = f->next, i++) { _remove_directory (ctx, notmuch, f->filename, &renamed_files, &removed_files); if (do_print_progress) {