File tree 2 files changed +6
-8
lines changed
2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -516,8 +516,8 @@ pub fn lstat(_p: &CString) -> IoResult<rtio::FileStat> {
516
516
517
517
pub fn utime ( p : & CString , atime : u64 , mtime : u64 ) -> IoResult < ( ) > {
518
518
let mut buf = libc:: utimbuf {
519
- actime : ( atime / 1000 ) as libc:: time64_t ,
520
- modtime : ( mtime / 1000 ) as libc:: time64_t ,
519
+ actime : atime as libc:: time64_t ,
520
+ modtime : mtime as libc:: time64_t ,
521
521
} ;
522
522
let p = try!( to_utf16 ( p) ) ;
523
523
super :: mkerr_libc ( unsafe {
Original file line number Diff line number Diff line change @@ -1588,26 +1588,24 @@ mod test {
1588
1588
"truncate didn't truncate" ) ;
1589
1589
} )
1590
1590
1591
- #[ test]
1592
- fn utime ( ) {
1591
+ iotest ! ( fn utime( ) {
1593
1592
let tmpdir = tmpdir( ) ;
1594
1593
let path = tmpdir. join( "a" ) ;
1595
1594
check!( File :: create( & path) ) ;
1596
1595
1597
1596
check!( change_file_times( & path, 1000 , 2000 ) ) ;
1598
1597
assert_eq!( check!( path. stat( ) ) . accessed, 1000 ) ;
1599
1598
assert_eq!( check!( path. stat( ) ) . modified, 2000 ) ;
1600
- }
1599
+ } )
1601
1600
1602
- #[ test]
1603
- fn utime_noexist ( ) {
1601
+ iotest ! ( fn utime_noexist( ) {
1604
1602
let tmpdir = tmpdir( ) ;
1605
1603
1606
1604
match change_file_times( & tmpdir. join( "a" ) , 100 , 200 ) {
1607
1605
Ok ( ..) => fail!( ) ,
1608
1606
Err ( ..) => { }
1609
1607
}
1610
- }
1608
+ } )
1611
1609
1612
1610
iotest ! ( fn binary_file( ) {
1613
1611
use rand:: { StdRng , Rng } ;
You can’t perform that action at this time.
0 commit comments