diff options
author | Greg Ward <gward@python.net> | 1999-06-08 17:05:21 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 1999-06-08 17:05:21 (GMT) |
commit | 5116f90ece5586cdca04e91cf0b1bb566bcc258d (patch) | |
tree | 9b53a50abaa0f0f3b826b7e6294fb073d9ca40d7 /Lib | |
parent | a8d0f4fd2d10a1f5e05d31e048e52a1192d84321 (diff) | |
download | cpython-5116f90ece5586cdca04e91cf0b1bb566bcc258d.zip cpython-5116f90ece5586cdca04e91cf0b1bb566bcc258d.tar.gz cpython-5116f90ece5586cdca04e91cf0b1bb566bcc258d.tar.bz2 |
On David Ascher's recommendation: reversed order of 'utime()' and
'chmod()' in 'copy_file()'.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/util.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py index 7aedc1c..9a299df 100644 --- a/Lib/distutils/util.py +++ b/Lib/distutils/util.py @@ -198,10 +198,13 @@ def copy_file (src, dst, _copy_file_contents (src, dst) if preserve_mode or preserve_times: st = os.stat (src) - if preserve_mode: - os.chmod (dst, S_IMODE (st[ST_MODE])) + + # According to David Ascher <da@ski.org>, utime() should be done + # before chmod() (at least under NT). if preserve_times: os.utime (dst, (st[ST_ATIME], st[ST_MTIME])) + if preserve_mode: + os.chmod (dst, S_IMODE (st[ST_MODE])) return 1 |