File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1668,11 +1668,6 @@ Executed at: {executed_at}"#,
16681668
16691669 if let Err ( e) = fs:: remove_file ( dst) {
16701670 if cfg ! ( windows) && e. kind ( ) != io:: ErrorKind :: NotFound {
1671- // workaround for https://github.com/rust-lang/rust/issues/127126
1672- // if removing the file fails, attempt to rename it instead.
1673- let now = t ! ( SystemTime :: now( ) . duration_since( SystemTime :: UNIX_EPOCH ) ) ;
1674- let _ = fs:: rename ( dst, format ! ( "{}-{}" , dst. display( ) , now. as_nanos( ) ) ) ;
1675-
16761671 #[ cfg( windows) ]
16771672 {
16781673 eprintln ! (
@@ -1727,6 +1722,11 @@ Executed at: {executed_at}"#,
17271722 }
17281723 }
17291724 }
1725+
1726+ // workaround for https://github.com/rust-lang/rust/issues/127126
1727+ // if removing the file fails, attempt to rename it instead.
1728+ let now = t ! ( SystemTime :: now( ) . duration_since( SystemTime :: UNIX_EPOCH ) ) ;
1729+ let _ = fs:: rename ( dst, format ! ( "{}-{}" , dst. display( ) , now. as_nanos( ) ) ) ;
17301730 }
17311731 }
17321732 let metadata = t ! ( src. symlink_metadata( ) , format!( "src = {}" , src. display( ) ) ) ;
You can’t perform that action at this time.
0 commit comments