diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-11-07 12:08:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-07 12:08:39 (GMT) |
commit | eb0e942ca86b177c69a8c3da7e20364d606c83cb (patch) | |
tree | 11f0b636c142310b05dc8c212e342d88e997d908 /Lib/shutil.py | |
parent | ea2316a220ea5ae5646518e3855ef22b9c84d64d (diff) | |
download | cpython-eb0e942ca86b177c69a8c3da7e20364d606c83cb.zip cpython-eb0e942ca86b177c69a8c3da7e20364d606c83cb.tar.gz cpython-eb0e942ca86b177c69a8c3da7e20364d606c83cb.tar.bz2 |
bpo-38523: ignore_dangling_symlinks does not apply recursively (GH-22937)
(cherry picked from commit 5ff81da6d3a8eb01fc5500fd1c9eaa6543286301)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r-- | Lib/shutil.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py index 0d27880..b7bffa3 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -487,12 +487,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) |