File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1071,10 +1071,11 @@ impl File {
1071
1071
cfg_if:: cfg_if! {
1072
1072
if #[ cfg( target_os = "redox" ) ] {
1073
1073
// Redox doesn't appear to support `UTIME_OMIT`.
1074
- return Err ( io:: const_io_error!(
1074
+ drop( times) ;
1075
+ Err ( io:: const_io_error!(
1075
1076
io:: ErrorKind :: Unsupported ,
1076
1077
"setting file times not supported" ,
1077
- ) ) ;
1078
+ ) )
1078
1079
} else if #[ cfg( any( target_os = "android" , target_os = "macos" ) ) ] {
1079
1080
// futimens requires macOS 10.13, and Android API level 19
1080
1081
cvt( unsafe {
@@ -1100,12 +1101,12 @@ impl File {
1100
1101
) ) ,
1101
1102
}
1102
1103
} ) ?;
1104
+ Ok ( ( ) )
1103
1105
} else {
1104
1106
cvt( unsafe { libc:: futimens( self . as_raw_fd( ) , times. 0 . as_ptr( ) ) } ) ?;
1107
+ Ok ( ( ) )
1105
1108
}
1106
1109
}
1107
-
1108
- Ok ( ( ) )
1109
1110
}
1110
1111
}
1111
1112
You can’t perform that action at this time.
0 commit comments