summaryrefslogtreecommitdiffstats
path: root/Lib/shutil.py
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2022-11-07 11:45:16 (GMT)
committerGitHub <noreply@github.com>2022-11-07 11:45:16 (GMT)
commit5ff81da6d3a8eb01fc5500fd1c9eaa6543286301 (patch)
treed53d1f869765652d672f55999cf500acb660e42a /Lib/shutil.py
parentcfec5b18bf4af9813ac3d83c5489469af4844708 (diff)
downloadcpython-5ff81da6d3a8eb01fc5500fd1c9eaa6543286301.zip
cpython-5ff81da6d3a8eb01fc5500fd1c9eaa6543286301.tar.gz
cpython-5ff81da6d3a8eb01fc5500fd1c9eaa6543286301.tar.bz2
bpo-38523: ignore_dangling_symlinks does not apply recursively (GH-22937)
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r--Lib/shutil.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index ac1dd53..f5687e3 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -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)