mirror of
https://github.com/python/cpython.git
synced 2025-09-09 18:32:22 +00:00
bpo-38523: ignore_dangling_symlinks does not apply recursively (GH-22937)
This commit is contained in:
parent
cfec5b18bf
commit
5ff81da6d3
3 changed files with 18 additions and 8 deletions
|
@ -490,12 +490,13 @@ def _copytree(entries, src, dst, symlinks, ignore, copy_function,
|
|||
# otherwise let the copy occur. copy2 will raise an error
|
||||
if srcentry.is_dir():
|
||||
copytree(srcobj, dstname, symlinks, ignore,
|
||||
copy_function, dirs_exist_ok=dirs_exist_ok)
|
||||
copy_function, ignore_dangling_symlinks,
|
||||
dirs_exist_ok)
|
||||
else:
|
||||
copy_function(srcobj, dstname)
|
||||
elif srcentry.is_dir():
|
||||
copytree(srcobj, dstname, symlinks, ignore, copy_function,
|
||||
dirs_exist_ok=dirs_exist_ok)
|
||||
ignore_dangling_symlinks, dirs_exist_ok)
|
||||
else:
|
||||
# Will raise a SpecialFileError for unsupported file types
|
||||
copy_function(srcobj, dstname)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue