Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Lib/shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,8 @@ def _copytree(entries, src, dst, symlinks, ignore, copy_function,
# We can't just leave it to `copy_function` because legacy
# code with a custom `copy_function` may rely on copytree
# doing the right thing.
if dirs_exist_ok and os.path.lexists(dstname):
os.unlink(dstname)
os.symlink(linkto, dstname)
copystat(srcobj, dstname, follow_symlinks=not symlinks)
else:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fixed shutil.copytree(), now it overrides existing symbolic links correctly
Loading