Percentage of file-count output was off by one.
authorWayne Davison <wayned@samba.org>
Tue, 27 Jan 2004 06:51:39 +0000 (06:51 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 27 Jan 2004 06:51:39 +0000 (06:51 +0000)
progress.c

index 42d8f35..969b98b 100644 (file)
@@ -77,7 +77,8 @@ static void rprint_progress(OFF_T ofs, OFF_T size, struct timeval *now,
        if (is_last) {
                snprintf(eol, sizeof eol, "  (%d, %.1f%% of %d)\n",
                        stats.num_transferred_files,
-                       (float)(stats.current_file_index * 100) / stats.num_files,
+                       (float)((stats.current_file_index+1) * 100)
+                               / stats.num_files,
                        stats.num_files);
        } else
                strcpy(eol, "\r");