summaryrefslogtreecommitdiff
path: root/src/pacman/downloadprog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/downloadprog.c')
-rw-r--r--src/pacman/downloadprog.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pacman/downloadprog.c b/src/pacman/downloadprog.c
index 06345782..16cfd6c9 100644
--- a/src/pacman/downloadprog.c
+++ b/src/pacman/downloadprog.c
@@ -65,6 +65,7 @@ void log_progress(const char *filename, int xfered, int total)
float total_timediff, timediff;
if(xfered == 0) {
+ set_output_padding(1); /* we need padding from pm_fprintf output */
gettimeofday(&initial_time, NULL);
gettimeofday(&last_time, NULL);
xfered_last = 0;
@@ -88,6 +89,7 @@ void log_progress(const char *filename, int xfered, int total)
/* compute final values */
rate = total / (total_timediff * 1024);
eta_s = (int)total_timediff;
+ set_output_padding(0); /* shut off padding */
} else if(timediff < UPDATE_SPEED_SEC) {
/* we avoid computing the ETA on too small periods of time, so that
results are more significant */