diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-08-02 10:52:49 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-08-02 10:52:49 -0700 |
| commit | 2677e5f4a07bf95b3abbc0cc8719e9e4e6b468de (patch) | |
| tree | ef1b05c80565c705f5f4d23a2de399aedcc7447a /src/libnative | |
| parent | 87bc22f587f1a18b447c4fa3cf967bbc0f7e7e17 (diff) | |
| download | rust-2677e5f4a07bf95b3abbc0cc8719e9e4e6b468de.tar.gz rust-2677e5f4a07bf95b3abbc0cc8719e9e4e6b468de.zip | |
native: Fix utime() for windows
Apparently the units are in milliseconds, not in seconds!
Diffstat (limited to 'src/libnative')
| -rw-r--r-- | src/libnative/io/file_win32.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libnative/io/file_win32.rs b/src/libnative/io/file_win32.rs index 0f8fa261802..a024d498ef3 100644 --- a/src/libnative/io/file_win32.rs +++ b/src/libnative/io/file_win32.rs @@ -516,8 +516,8 @@ pub fn lstat(_p: &CString) -> IoResult<rtio::FileStat> { pub fn utime(p: &CString, atime: u64, mtime: u64) -> IoResult<()> { let mut buf = libc::utimbuf { - actime: (atime / 1000) as libc::time64_t, - modtime: (mtime / 1000) as libc::time64_t, + actime: atime as libc::time64_t, + modtime: mtime as libc::time64_t, }; let p = try!(to_utf16(p)); super::mkerr_libc(unsafe { |
