]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-new.c
devel/check-out-of-tree-build.sh: consistent naming, consistent quoting
[notmuch] / notmuch-new.c
index 378bf4c2a15a7dd2a1215b77998d8f73daad1943..50597b75c07e3419c8bccdbc1ab35b2143a1c2e4 100644 (file)
@@ -521,6 +521,10 @@ add_files (notmuch_database_t *notmuch,
     for (i = 0; i < num_fs_entries && ! interrupted; i++) {
         entry = fs_entries[i];
 
+       /* Ignore special directories early. */
+       if (_special_directory (entry->d_name))
+           continue;
+
        /* Ignore files & directories user has configured to be ignored */
        if (_entry_in_ignore_list (entry->d_name, state)) {
            if (state->debug)
@@ -955,12 +959,12 @@ notmuch_new_command (notmuch_config_t *config, int argc, char *argv[])
     notmuch_status_t status;
 
     notmuch_opt_desc_t options[] = {
-       { NOTMUCH_OPT_BOOLEAN,  &quiet, "quiet", 'q', 0 },
-       { NOTMUCH_OPT_BOOLEAN,  &verbose, "verbose", 'v', 0 },
-       { NOTMUCH_OPT_BOOLEAN,  &add_files_state.debug, "debug", 'd', 0 },
-       { NOTMUCH_OPT_BOOLEAN,  &no_hooks, "no-hooks", 'n', 0 },
-       { NOTMUCH_OPT_INHERIT, (void *) &notmuch_shared_options, NULL, 0, 0 },
-       { 0, 0, 0, 0, 0 }
+       { .opt_bool = &quiet, .name = "quiet" },
+       { .opt_bool = &verbose, .name = "verbose" },
+       { .opt_bool = &add_files_state.debug, .name = "debug" },
+       { .opt_bool = &no_hooks, .name = "no-hooks" },
+       { .opt_inherit = notmuch_shared_options },
+       { }
     };
 
     opt_index = parse_arguments (argc, argv, options, 1);