Skip to content

Commit

Permalink
Remove object file directly rather than running "rm". Close rust-lang…
Browse files Browse the repository at this point in the history
…#1778 also.
  • Loading branch information
graydon committed Mar 20, 2012
1 parent 0973bcc commit b994b17
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rustc/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,10 @@ fn link_binary(sess: session,

// Remove the temporary object file if we aren't saving temps
if !sess.opts.save_temps {
run::run_program("rm", [obj_filename]);
if ! os::remove_file(obj_filename) {
sess.warn(#fmt["failed to delete object file '%s'",
obj_filename]);
}
}
}
//
Expand Down

0 comments on commit b994b17

Please sign in to comment.