summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-01-14 00:42:00 (GMT)
committerGuido van Rossum <guido@python.org>1999-01-14 00:42:00 (GMT)
commite1bf7e8c1d5ec4e16a7dc772e3e6091e773e5007 (patch)
treec1db5ee0181f186e202a85aabee789e55fb25b03 /Lib
parent9481821123723b6fd09f556209034b2b854ce6f8 (diff)
downloadcpython-e1bf7e8c1d5ec4e16a7dc772e3e6091e773e5007.zip
cpython-e1bf7e8c1d5ec4e16a7dc772e3e6091e773e5007.tar.gz
cpython-e1bf7e8c1d5ec4e16a7dc772e3e6091e773e5007.tar.bz2
Change the order of the utime() and the chmod() call in copystat().
This doesn't make a bit of difference on Unix, but apparently on Windows NT you need write permission before you can set the utime...
Diffstat (limited to 'Lib')
-rw-r--r--Lib/shutil.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index a248c6e..b44a069 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -36,8 +36,8 @@ def copystat(src, dst):
"""Copy all stat info (mode bits, atime and mtime) from src to dst"""
st = os.stat(src)
mode = stat.S_IMODE(st[stat.ST_MODE])
- os.chmod(dst, mode)
os.utime(dst, (st[stat.ST_ATIME], st[stat.ST_MTIME]))
+ os.chmod(dst, mode)
def copy(src, dst):