X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=notmuch-new.c;h=50597b75c07e3419c8bccdbc1ab35b2143a1c2e4;hb=54aef071590cb23f61da943daa29080cf7446696;hp=378bf4c2a15a7dd2a1215b77998d8f73daad1943;hpb=23819e82d061502fce8d3876f3e606aa56ca6ea0;p=notmuch diff --git a/notmuch-new.c b/notmuch-new.c index 378bf4c2..50597b75 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -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 *) ¬much_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);