Fix directories yielded twice, once as current and once as child.
This commit is contained in:
parent
0cb646fda0
commit
0cff7b8734
1 changed files with 0 additions and 2 deletions
|
@ -685,8 +685,6 @@ def walk_generator(
|
||||||
|
|
||||||
def walkstep_flat(current_location, child_dirs, child_files):
|
def walkstep_flat(current_location, child_dirs, child_files):
|
||||||
if yield_directories:
|
if yield_directories:
|
||||||
yield pathclass.Path(current_location)
|
|
||||||
|
|
||||||
for child_dir in child_dirs:
|
for child_dir in child_dirs:
|
||||||
child_dir_abspath = f'{current_location}{os.sep}{child_dir}'
|
child_dir_abspath = f'{current_location}{os.sep}{child_dir}'
|
||||||
if handle_exclusion(exclude_directories, child_dir, child_dir_abspath, 'directory'):
|
if handle_exclusion(exclude_directories, child_dir, child_dir_abspath, 'directory'):
|
||||||
|
|
Loading…
Reference in a new issue