mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Tick after creating progress bar to draw it
This commit is contained in:
parent
42b9b7b62c
commit
8a837dae21
1 changed files with 9 additions and 9 deletions
|
@ -971,16 +971,16 @@ fn copy(sources: &[Source], target: &TargetSlice, options: &Options) -> CopyResu
|
|||
let mut symlinked_files = HashSet::new();
|
||||
|
||||
let progress_bar = if options.progress_bar {
|
||||
Some(
|
||||
ProgressBar::new(disk_usage(sources, options.recursive)?)
|
||||
.with_style(
|
||||
ProgressStyle::with_template(
|
||||
"{msg}: [{elapsed_precise}] {wide_bar} {bytes:>7}/{total_bytes:7}",
|
||||
)
|
||||
.unwrap(),
|
||||
let pb = ProgressBar::new(disk_usage(sources, options.recursive)?)
|
||||
.with_style(
|
||||
ProgressStyle::with_template(
|
||||
"{msg}: [{elapsed_precise}] {wide_bar} {bytes:>7}/{total_bytes:7}",
|
||||
)
|
||||
.with_message(uucore::util_name()),
|
||||
)
|
||||
.unwrap(),
|
||||
)
|
||||
.with_message(uucore::util_name());
|
||||
pb.tick();
|
||||
Some(pb)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue