Skip to content

Commit 6c510b0

Browse files
committed
Auto merge of #3953 - jessicah:haiku-renaming-fix, r=alexcrichton
Haiku: skip renaming if filenames are the same
2 parents 994e552 + 54b968e commit 6c510b0

File tree

1 file changed

+1
-1
lines changed
  • src/cargo/ops/cargo_rustc

1 file changed

+1
-1
lines changed

src/cargo/ops/cargo_rustc/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ fn rustc(cx: &mut Context, unit: &Unit, exec: Arc<Executor>) -> CargoResult<Work
369369
let src = dst.with_file_name(dst.file_name().unwrap()
370370
.to_str().unwrap()
371371
.replace(&real_name, &crate_name));
372-
if src.exists() {
372+
if src.exists() && src.file_name() != dst.file_name() {
373373
fs::rename(&src, &dst).chain_error(|| {
374374
internal(format!("could not rename crate {:?}", src))
375375
})?;

0 commit comments

Comments
 (0)