From ba179ba177a0bb159640ce25470fbf63319e51b2 Mon Sep 17 00:00:00 2001 From: Xavier Chantry Date: Wed, 20 Aug 2008 23:17:02 +0200 Subject: [PATCH] download : disable progressbar when total is unknown. This is a work around for FS#8725. There are some bad combination of proxies and mirrors where the Content Length is not returned, and thus the progress bar can't be displayed correctly. Signed-off-by: Xavier Chantry --- src/pacman/callback.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/pacman/callback.c b/src/pacman/callback.c index bc609d8..c6e4ce7 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -442,7 +442,10 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total) int file_percent = 0, total_percent = 0; char rate_size = 'K', xfered_size = 'K'; - if(config->noprogressbar) { + if(config->noprogressbar || file_total <= 0) { + if(file_xfered == 0) { + printf(_("downloading %s...\n"), filename); + } return; } -- 1.6.0