diff options
author | Jani Nikula <jani@nikula.org> | 2017-09-01 18:53:09 +0300 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2017-10-02 07:59:30 -0300 |
commit | 9d48ee2eaacce7323622e6017f7bdb01a915e885 (patch) | |
tree | b41e6db0314969802ac5447b04501e5b62d3e4de /notmuch-new.c | |
parent | 23819e82d061502fce8d3876f3e606aa56ca6ea0 (diff) |
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.
Diffstat (limited to 'notmuch-new.c')
-rw-r--r-- | notmuch-new.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/notmuch-new.c b/notmuch-new.c index 378bf4c2..2ce3af87 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) |