diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-07-05 11:23:56 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-07-05 11:23:56 (GMT) |
commit | 9d0dfc6f26ad3d606489b792d1bdcf2eec5d662a (patch) | |
tree | 293db9ae88c24203badec31d456641e9628b127a /generic/tclIOUtil.c | |
parent | a33b0950bea676a85d343c325899ec36b8889d3d (diff) | |
parent | 4d25168772b31a4966cb76f931eda3fbff01202b (diff) | |
download | tcl-9d0dfc6f26ad3d606489b792d1bdcf2eec5d662a.zip tcl-9d0dfc6f26ad3d606489b792d1bdcf2eec5d662a.tar.gz tcl-9d0dfc6f26ad3d606489b792d1bdcf2eec5d662a.tar.bz2 |
Fix [4718b41c56d8c135]: windows x86 & x64: file mtime overflows in modification date. Only fixed for x64, because for x86 it isn't possible without breaking API compatibility
Diffstat (limited to 'generic/tclIOUtil.c')
-rw-r--r-- | generic/tclIOUtil.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 27acbbc..28b65ff 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -327,9 +327,9 @@ Tcl_Stat( oldStyleBuf->st_uid = buf.st_uid; oldStyleBuf->st_gid = buf.st_gid; oldStyleBuf->st_size = (off_t) buf.st_size; - oldStyleBuf->st_atime = buf.st_atime; - oldStyleBuf->st_mtime = buf.st_mtime; - oldStyleBuf->st_ctime = buf.st_ctime; + oldStyleBuf->st_atime = Tcl_GetAccessTimeFromStat(&buf); + oldStyleBuf->st_mtime = Tcl_GetModificationTimeFromStat(&buf); + oldStyleBuf->st_ctime = Tcl_GetChangeTimeFromStat(&buf); #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE oldStyleBuf->st_blksize = buf.st_blksize; #endif @@ -4392,8 +4392,8 @@ TclCrossFilesystemCopy( */ if (Tcl_FSLstat(source, &sourceStatBuf) == 0) { - tval.actime = sourceStatBuf.st_atime; - tval.modtime = sourceStatBuf.st_mtime; + tval.actime = Tcl_GetAccessTimeFromStat(&sourceStatBuf); + tval.modtime = Tcl_GetModificationTimeFromStat(&sourceStatBuf); Tcl_FSUtime(target, &tval); } |