Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 96372a2

Browse files
committed
ST_MODE should be ST_MTIME in utime call in copystat. Thanks to Mike Orr.
1 parent 64e736b commit 96372a2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/shutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def copystat(src, dst):
3737
st = os.stat(src)
3838
mode = stat.S_IMODE(st[stat.ST_MODE])
3939
os.chmod(dst, mode)
40-
os.utime(dst, (st[stat.ST_ATIME], st[stat.ST_MODE]))
40+
os.utime(dst, (st[stat.ST_ATIME], st[stat.ST_MTIME]))
4141

4242

4343
def copy(src, dst):

0 commit comments

Comments
 (0)