From 0cff7b873484bc50153991205e48f9f2011e4a55 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 1 Feb 2020 16:20:40 -0800 Subject: [PATCH] Fix directories yielded twice, once as current and once as child. --- voussoirkit/spinal.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/voussoirkit/spinal.py b/voussoirkit/spinal.py index 4470d10..cbac41b 100644 --- a/voussoirkit/spinal.py +++ b/voussoirkit/spinal.py @@ -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'):