mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
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. Dan: Note that this patch also adds a "downloading" message when the progress bar is disabled, which was formerly not indicated at all in the output. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
081f64aea3
commit
e760c4f478
@ -444,7 +444,10 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total)
|
|||||||
int file_percent = 0, total_percent = 0;
|
int file_percent = 0, total_percent = 0;
|
||||||
char rate_size = 'K', xfered_size = 'K';
|
char rate_size = 'K', xfered_size = 'K';
|
||||||
|
|
||||||
if(config->noprogressbar) {
|
if(config->noprogressbar || file_total == -1) {
|
||||||
|
if(file_xfered == 0) {
|
||||||
|
printf(_("downloading %s...\n"), filename);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user