bpo-39390 shutil: fix argument types for ignore callback (GH-18122)

This commit is contained in:
mbarkhau 2020-01-24 14:51:16 +00:00 committed by Giampaolo Rodola
parent 66b00a9d3a
commit 88704334e5
3 changed files with 45 additions and 1 deletions

View file

@ -442,7 +442,7 @@ def ignore_patterns(*patterns):
def _copytree(entries, src, dst, symlinks, ignore, copy_function,
ignore_dangling_symlinks, dirs_exist_ok=False):
if ignore is not None:
ignored_names = ignore(src, {x.name for x in entries})
ignored_names = ignore(os.fspath(src), [x.name for x in entries])
else:
ignored_names = set()