--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -442,7 +442,7 @@ class dirstate(object):
# don't trip over symlinks
st = os.lstat(p)
if stat.S_ISDIR(st.st_mode):
- if not ignore(p):
+ if not ignore(np):
work.append(p)
if directories:
yield 'd', np, st