]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-new.c
Prevent data loss caused by SIGINT during notmuch new
[notmuch] / notmuch-new.c
index 44b50aaa2c49ceea06825abea39256790f2c1a5d..484d94623fa13fb1b456a185e1f1eecc5133bfea 100644 (file)
@@ -454,6 +454,9 @@ add_files_recursive (notmuch_database_t *notmuch,
        next = NULL;
     }
 
+    if (interrupted)
+       goto DONE;
+
     /* Now that we've walked the whole filesystem list, anything left
      * over in the database lists has been deleted. */
     while (notmuch_filenames_valid (db_files))