We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6d288b commit ea26272Copy full SHA for ea26272
build_system/utils.rs
@@ -213,11 +213,13 @@ pub(crate) fn copy_dir_recursively(from: &Path, to: &Path) {
213
if filename == "." || filename == ".." {
214
continue;
215
}
216
+ let src = from.join(&filename);
217
+ let dst = to.join(&filename);
218
if entry.metadata().unwrap().is_dir() {
- fs::create_dir(to.join(&filename)).unwrap();
- copy_dir_recursively(&from.join(&filename), &to.join(&filename));
219
+ fs::create_dir(&dst).unwrap_or_else(|e| panic!("failed to create {dst:?}: {e}"));
220
+ copy_dir_recursively(&src, &dst);
221
} else {
- fs::copy(from.join(&filename), to.join(&filename)).unwrap();
222
+ fs::copy(&src, &dst).unwrap_or_else(|e| panic!("failed to copy {src:?}->{dst:?}: {e}"));
223
224
225
0 commit comments