mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Tick after creating progress bar to draw it
This commit is contained in:
+9
-9
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user