diff options
author | Wayne Davison <wayned@samba.org> | 2014-02-24 09:49:04 -0800 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2014-02-24 10:07:18 -0800 |
commit | cd909fde87b75ce7f75b9b7e8733d9133cde3ae9 (patch) | |
tree | 92c2c6694692f8674b06f3185ec53537124f8b5e | |
parent | 4dfe7c9f3ec72a8cd04eaa880542274e3df64d22 (diff) | |
download | rsync-cd909fde87b75ce7f75b9b7e8733d9133cde3ae9.tar.gz rsync-cd909fde87b75ce7f75b9b7e8733d9133cde3ae9.tar.bz2 rsync-cd909fde87b75ce7f75b9b7e8733d9133cde3ae9.zip |
Fix --info=progress2 info as a file is transferred.
Applying Anish Shankar's patch to fix speed and stats of files as they
are transferred. Fixes bug 10450.
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | progress.c | 11 |
2 files changed, 11 insertions, 5 deletions
@@ -31,6 +31,11 @@ Changes since 3.1.0: - Fixed a bug that caused a failure when combining --delete-missing-args with --xattrs and/or --acls. + - Fixed a problem with --info=progress2's output stats where rsync would + only update the stats at the end of each file's transfer. It now uses + the data that is flowing for the current file, making the stats more + accurate and less jumpy. + - Fixed an itemize bug that affected the combo of --link-dest, -X, and -n. - Fixed a problem with delete messages not appearing in the log file when @@ -177,6 +177,11 @@ void show_progress(OFF_T ofs, OFF_T size) gettimeofday(&now, NULL); + if (INFO_GTE(PROGRESS, 2)) { + ofs = stats.total_transferred_size - size + ofs; + size = stats.total_size; + } + if (!ph_start.time.tv_sec) { int i; @@ -212,9 +217,5 @@ void show_progress(OFF_T ofs, OFF_T size) return; #endif - if (INFO_GTE(PROGRESS, 2)) { - rprint_progress(stats.total_transferred_size, - stats.total_size, &now, False); - } else - rprint_progress(ofs, size, &now, False); + rprint_progress(ofs, size, &now, False); } |