Skip to content

Commit

Permalink
fix: progress of copy
Browse files Browse the repository at this point in the history
  • Loading branch information
thewh1teagle committed Dec 15, 2024
1 parent 50e4686 commit 2118205
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ fn main() -> Result<()> {
// Set up progress handler
#[allow(unused)]
let dir_progress_handler = |info: fs_extra::dir::TransitProcess| {

tracing::info!(
"Progress: {}% ({}/{})",
info.file_bytes_copied * 100 / info.total_bytes,
format_size(info.file_bytes_copied as u64, DECIMAL),
info.copied_bytes * 100 / info.total_bytes,
format_size(info.copied_bytes as u64, DECIMAL),
format_size(info.total_bytes as u64, DECIMAL)
);
// Exists
Expand All @@ -111,6 +112,7 @@ fn main() -> Result<()> {

#[allow(unused)]
let file_progress_handler = |info: fs_extra::file::TransitProcess| {

tracing::info!(
"Progress: {}% ({}/{})",
info.copied_bytes * 100 / info.total_bytes,
Expand Down

0 comments on commit 2118205

Please sign in to comment.