Fix directories yielded twice, once as current and once as child.

This commit is contained in:
Ethan Dalool 2020-02-01 16:20:40 -08:00
parent 0cb646fda0
commit 0cff7b8734

View file

@ -685,8 +685,6 @@ def walk_generator(
def walkstep_flat(current_location, child_dirs, child_files):
if yield_directories:
yield pathclass.Path(current_location)
for child_dir in child_dirs:
child_dir_abspath = f'{current_location}{os.sep}{child_dir}'
if handle_exclusion(exclude_directories, child_dir, child_dir_abspath, 'directory'):