projects
/
notmuch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23819e8
)
cli/new: ignore special directories also in pass 2
author
Jani Nikula
<jani@nikula.org>
Fri, 1 Sep 2017 15:53:09 +0000
(18:53 +0300)
committer
David Bremner
<david@tethera.net>
Mon, 2 Oct 2017 10:59:30 +0000
(07:59 -0300)
Avoid passing . and .. to ignore check. We also don't need to check
their dirent type either.
notmuch-new.c
patch
|
blob
|
history
diff --git
a/notmuch-new.c
b/notmuch-new.c
index 378bf4c2a15a7dd2a1215b77998d8f73daad1943..2ce3af872f0ed95eb6ab8f036e01edda302f2856 100644
(file)
--- 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)