You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
shutil.copytree() should use os.lutimes() to copy the metadata of symlinks #56911
bpo-12715: Add symlink support to shutil functions
Superseder
bpo-12715: Add symlink support to shutil functions
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2012-02-22.20:08:56.458>created_at=<Date2011-08-06.06:42:47.747>labels= ['easy', 'type-bug', 'library']
title='shutil.copytree() should use os.lutimes() to copy the metadata of symlinks'updated_at=<Date2012-02-22.20:08:56.457>user='https://github.com/akheron'
As discussed in bpo-12183, shutil.copytree(..., symlinks=True) should copy the metadata of symlinks instead of the metadata of the file that the symlink refers to.
This can be achieved by using os.lstat() and os.lutimes() (new in 3.3) on symlinks.
Activity
akheron commentedon Aug 6, 2011
As discussed in bpo-12183, shutil.copytree(..., symlinks=True) should copy the metadata of symlinks instead of the metadata of the file that the symlink refers to.
This can be achieved by using os.lstat() and os.lutimes() (new in 3.3) on symlinks.
ned-deily commentedon Aug 6, 2011
Keep in mind that os.lutimes() may not be available on the platform so the patch will need to test for that.
akheron commentedon Aug 9, 2011
Added bpo-12715 as a dependency for this issue, as shutil.copy2(src, dst, symlinks=True) would be an obvious way to implement this.
berkerpeksag commentedon Feb 19, 2012
I think this issue fixed in changeset 74194:cf57ef65bcd0.
See: http://hg.python.org/cpython/rev/cf57ef65bcd0#l2.75
akheron commentedon Feb 22, 2012
Yeah. Seems that fixing bpo-12715 automatically also fixed this, so closing as duplicate.