mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Merge pull request #4179 from djedi23/verbose_and_progress
Suspend the progress bar before printing the copied files.
This commit is contained in:
commit
efa0fd498b
1 changed files with 8 additions and 1 deletions
|
@ -1350,7 +1350,14 @@ fn copy_file(
|
||||||
}
|
}
|
||||||
|
|
||||||
if options.verbose {
|
if options.verbose {
|
||||||
println!("{}", context_for(source, dest));
|
if let Some(pb) = progress_bar {
|
||||||
|
// Suspend (hide) the progress bar so the println won't overlap with the progress bar.
|
||||||
|
pb.suspend(|| {
|
||||||
|
println!("{}", context_for(source, dest));
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
println!("{}", context_for(source, dest));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculate the context upfront before canonicalizing the path
|
// Calculate the context upfront before canonicalizing the path
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue