Browse Source

Fall back to copy if hard linking fails

Closes #60
add-rc-path
Alex Crichton 9 years ago
parent
commit
48a6eb9a16
  1. 4
      tests/test.rs

4
tests/test.rs

@ -46,7 +46,9 @@ impl Test {
fn shim(&self, name: &str) -> &Test {
let fname = format!("{}{}", name, env::consts::EXE_SUFFIX);
fs::hard_link(&self.gcc, self.td.path().join(fname)).unwrap();
fs::hard_link(&self.gcc, self.td.path().join(&fname)).or_else(|_| {
fs::copy(&self.gcc, self.td.path().join(&fname)).map(|_| ())
}).unwrap();
self
}

Loading…
Cancel
Save