homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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) * (Python committer) 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) * (Python committer) 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) * (Python committer) 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) * (Python committer) 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) * (Python committer) 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:20adminsetgithub: 56911
2012年02月22日 20:08:56petri.lehtinensetstatus: open -> closed
resolution: duplicate
superseder: Add symlink support to shutil functions
messages: + msg153985
2012年02月19日 23:16:32berker.peksagsetnosy: + berker.peksag
messages: + msg153731
2011年08月09日 12:19:06petri.lehtinensetmessages: + msg141814
2011年08月09日 12:18:26petri.lehtinensetdependencies: + Add symlink support to shutil functions
2011年08月09日 04:35:10rosslagerwallsetnosy: + rosslagerwall
2011年08月06日 22:13:56ned.deilysetnosy: + ned.deily
messages: + msg141729
2011年08月06日 06:42:47petri.lehtinencreate

AltStyle によって変換されたページ (->オリジナル) /