1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 12:07:46 +00:00

Suspend the progress bar before printing the copied files.

This commit is contained in:
Moïse Valvassori 2022-11-23 18:42:07 +01:00 committed by Sylvestre Ledru
parent e307f624e8
commit 1b004053ac

View file

@ -1350,7 +1350,13 @@ fn copy_file(
}
if options.verbose {
if let Some(pb) = progress_bar {
pb.suspend(|| {
println!("{}", context_for(source, dest));
});
} else {
println!("{}", context_for(source, dest));
}
}
// Calculate the context upfront before canonicalizing the path