Simplify this destination_file yielder.

master
voussoir 2021-01-18 01:18:55 -08:00
parent acab8e0c78
commit 826c2f5e5d
No known key found for this signature in database
GPG Key ID: 5F7554F8C26DACCB
1 changed files with 4 additions and 2 deletions

View File

@ -272,10 +272,12 @@ def copy_dir(
destination.absolute_path, destination.absolute_path,
1 1
)) ))
if callback_pre_directory(directory, destination_dir, dry_run=dry_run) is BAIL: if callback_pre_directory(directory, destination_dir, dry_run=dry_run) is BAIL:
continue 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) yield (source_file, destination_file)
walker = denester(walker) walker = denester(walker)