Skip to content

Commit 5107ac9

Browse files
committed
Do not call fs::remove_file in cp_link_filtered_recurse
The target is removed by `copy_link` too, so no need to duplicate the syscall.
1 parent 1ae7c49 commit 5107ac9

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/bootstrap/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1862,7 +1862,6 @@ impl Build {
18621862
self.create_dir(&dst);
18631863
self.cp_link_filtered_recurse(&path, &dst, &relative, filter);
18641864
} else {
1865-
let _ = fs::remove_file(&dst);
18661865
self.copy_link(&path, &dst, FileType::Regular);
18671866
}
18681867
}

0 commit comments

Comments
 (0)