Don't apply excludes greedily to subdirs

This commit is contained in:
Anthony Sottile 2017-03-16 12:48:14 -07:00
parent 733a4f053b
commit 0559e0b43c
2 changed files with 16 additions and 1 deletions

View file

@ -246,7 +246,7 @@ def filenames_from(arg, predicate=None):
# remove it from the list of sub-directories.
for directory in sub_directories:
joined = os.path.join(root, directory)
if predicate(directory) or predicate(joined):
if predicate(joined):
sub_directories.remove(directory)
for filename in files: