From 211820526f40d4217f51fc67f454afb292ef0679 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 15 Dec 2024 04:26:47 +0200 Subject: [PATCH] fix: progress of copy --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index bc35cfa..11bf252 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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 @@ -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,