Issue 12702: shutil.copytree() should use os.lutimes() to copy the metadata of symlinks (original) (raw)
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/56911
classification
Title: | shutil.copytree() should use os.lutimes() to copy the metadata of symlinks | ||
---|---|---|---|
Type: | behavior | Stage: | |
Components: | Library (Lib) | Versions: | Python 3.3 |
process
Status: | closed | Resolution: | duplicate |
---|---|---|---|
Dependencies: | 12715 | Superseder: | Add symlink support to shutil functions View:12715 |
Assigned To: | Nosy List: | berker.peksag, ned.deily, orsenthil, petri.lehtinen, rosslagerwall | |
Priority: | normal | Keywords: | easy |
Created on 2011-08-06 06:42 by petri.lehtinen, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Messages (5) | ||
---|---|---|
msg141712 - (view) | Author: Petri Lehtinen (petri.lehtinen) * ![]() |
Date: 2011-08-06 06:42 |
As discussed in issue 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. | ||
msg141729 - (view) | Author: Ned Deily (ned.deily) * ![]() |
Date: 2011-08-06 22:13 |
Keep in mind that os.lutimes() may not be available on the platform so the patch will need to test for that. | ||
msg141814 - (view) | Author: Petri Lehtinen (petri.lehtinen) * ![]() |
Date: 2011-08-09 12:19 |
Added issue 12715 as a dependency for this issue, as shutil.copy2(src, dst, symlinks=True) would be an obvious way to implement this. | ||
msg153731 - (view) | Author: Berker Peksag (berker.peksag) * ![]() |
Date: 2012-02-19 23:16 |
I think this issue fixed in changeset 74194:cf57ef65bcd0. See: http://hg.python.org/cpython/rev/cf57ef65bcd0#l2.75 | ||
msg153985 - (view) | Author: Petri Lehtinen (petri.lehtinen) * ![]() |
Date: 2012-02-22 20:08 |
Yeah. Seems that fixing #12715 automatically also fixed this, so closing as duplicate. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:20 | admin | set | github: 56911 |
2012-02-22 20:08:56 | petri.lehtinen | set | status: open -> closedresolution: duplicatesuperseder: Add symlink support to shutil functionsmessages: + |
2012-02-19 23:16:32 | berker.peksag | set | nosy: + berker.peksagmessages: + |
2011-08-09 12:19:06 | petri.lehtinen | set | messages: + |
2011-08-09 12🔞26 | petri.lehtinen | set | dependencies: + Add symlink support to shutil functions |
2011-08-09 04:35:10 | rosslagerwall | set | nosy: + rosslagerwall |
2011-08-06 22:13:56 | ned.deily | set | nosy: + ned.deilymessages: + |
2011-08-06 06:42:47 | petri.lehtinen | create |