Skip to content

Commit 781b871

Browse files
committed
Print every file copied for debugging
1 parent 8673d05 commit 781b871

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,9 @@ fn copy_images(from: &str, to: &str) {
266266
println!("Copying images from {}", from);
267267
for entry in fs::read_dir(from).expect("Can't read directory") {
268268
let path = entry.unwrap().path();
269-
fs::copy(&path, format!("{}/{}_Texture2D.png", to, path.file_stem().unwrap().to_str().unwrap())).expect("Unable to copy");
269+
let to_path = format!("{}/{}_Texture2D.png", to, path.file_stem().unwrap().to_str().unwrap());
270+
println!("Copying Image {} -> {}", path.to_string_lossy(), to_path);
271+
fs::copy(&path, to_path).expect("Unable to copy");
270272
}
271273
}
272274

@@ -278,6 +280,8 @@ fn copy_files(from: &str, to: &str) {
278280
println!("Copying files from {}", from);
279281
for entry in fs::read_dir(from).expect("Can't read directory") {
280282
let path = entry.unwrap().path();
281-
fs::copy(&path, format!("{}/{}", to, path.file_name().unwrap().to_str().unwrap())).expect("Unable to copy");
283+
let to_path = format!("{}/{}", to, path.file_name().unwrap().to_str().unwrap());
284+
println!("Copying File {} -> {}", path.to_string_lossy(), to_path);
285+
fs::copy(&path, to_path).expect("Unable to copy");
282286
}
283287
}

0 commit comments

Comments
 (0)