We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5de3228 + 3e50d2d commit ea8ca9dCopy full SHA for ea8ca9d
collector/src/bin/rustc-perf-collector/execute.rs
@@ -577,12 +577,14 @@ impl Benchmark {
577
}
578
579
fn make_temp_dir(&self, base: &Path) -> Result<TempDir, Error> {
580
+ // Appending `.` means we copy just the contents of `base` into
581
+ // `tmp_dir`, rather than `base` itself.
582
+ let mut base_dot = base.to_path_buf();
583
+ base_dot.push(".");
584
let tmp_dir = TempDir::new()?;
585
let mut cmd = Command::new("cp");
- cmd.arg("-r")
- .arg("-T")
- .arg("--")
- .arg(base)
586
+ cmd.arg("-R")
587
+ .arg(base_dot)
588
.arg(tmp_dir.path());
589
command_output(&mut cmd).with_context(|_| format!("copying {} to tmp dir", self.name))?;
590
Ok(tmp_dir)
0 commit comments