diff options
Diffstat (limited to 'src/bootstrap/lib.rs')
-rw-r--r-- | src/bootstrap/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 9203a558f64..ad0bdd0f425 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -1144,6 +1144,7 @@ impl Build { pub fn copy(&self, src: &Path, dst: &Path) { if self.config.dry_run { return; } self.verbose_than(1, &format!("Copy {:?} to {:?}", src, dst)); + if src == dst { return; } let _ = fs::remove_file(&dst); let metadata = t!(src.symlink_metadata()); if metadata.file_type().is_symlink() { |