cli/new: ignore special directories also in pass 2

Avoid passing . and .. to ignore check. We also don't need to check
their dirent type either.
This commit is contained in:
Jani Nikula 2017-09-01 18:53:09 +03:00 committed by David Bremner
parent 23819e82d0
commit 9d48ee2eaa

View 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)