aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-new.c
diff options
context:
space:
mode:
authorGravatar Jani Nikula <jani@nikula.org>2014-01-19 22:32:23 +0200
committerGravatar David Bremner <david@tethera.net>2014-01-26 09:37:01 -0400
commit65ebd34329e31a9a8a6f4a2d1e255ef273b0678e (patch)
treedf3ddfe5ef008d213bbb82a0eaa0257869144521 /notmuch-new.c
parentcaf5514a3692d6ad6be257a24a5b5a44164bb90a (diff)
cli: only check the ignore list if needed
Premature optimization is the root of all evil, but this is simple enough.
Diffstat (limited to 'notmuch-new.c')
-rw-r--r--notmuch-new.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/notmuch-new.c b/notmuch-new.c
index 1dd8fc95..7f3b3b08 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -728,7 +728,7 @@ count_files (const char *path, int *count, add_files_state_t *state)
strcmp (entry->d_name, ".notmuch") == 0 ||
_entry_in_ignore_list (entry->d_name, state))
{
- if (_entry_in_ignore_list (entry->d_name, state) && state->debug)
+ if (state->debug && _entry_in_ignore_list (entry->d_name, state))
printf ("(D) count_files: explicitly ignoring %s/%s\n",
path,
entry->d_name);