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.
This commit is contained in:
Jakub Beránek 2025-08-15 17:13:21 +02:00
parent 1ae7c49072
commit 5107ac92bb
No known key found for this signature in database
GPG key ID: 909CD0D26483516B

View file

@ -1862,7 +1862,6 @@ impl Build {
self.create_dir(&dst);
self.cp_link_filtered_recurse(&path, &dst, &relative, filter);
} else {
let _ = fs::remove_file(&dst);
self.copy_link(&path, &dst, FileType::Regular);
}
}