Do not follow symlink when we copy a directory.

This commit is contained in:
Matthieu Gautier 2023-10-20 15:12:36 +02:00
parent 3d9d371759
commit 11bdf7fc52
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ def copy_tree(src, dst, post_copy_function=None):
os.makedirs(dstdir, exist_ok=True)
for f in files:
dstfile = pj(dstdir, f)
shutil.copy2(pj(root, f), dstfile)
shutil.copy2(pj(root, f), dstfile, follow_symlinks=False)
if post_copy_function is not None:
post_copy_function(dstfile)