From 826c2f5e5d3fbbe47573e4051ea45a5b51e2469a Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Mon, 18 Jan 2021 01:18:55 -0800 Subject: [PATCH] Simplify this destination_file yielder. --- voussoirkit/spinal.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/voussoirkit/spinal.py b/voussoirkit/spinal.py index cb0b5b8..fe401ef 100644 --- a/voussoirkit/spinal.py +++ b/voussoirkit/spinal.py @@ -272,10 +272,12 @@ def copy_dir( destination.absolute_path, 1 )) + if callback_pre_directory(directory, destination_dir, dry_run=dry_run) is BAIL: continue - destination_files = (destination_dir.with_child(file.basename) for file in files) - for (source_file, destination_file) in zip(files, destination_files): + + for source_file in files: + destination_file = destination_dir.with_child(source_file.basename) yield (source_file, destination_file) walker = denester(walker)