aboutsummaryrefslogtreecommitdiffstats
path: root/grpmi/grpmi.pl
diff options
context:
space:
mode:
Diffstat (limited to 'grpmi/grpmi.pl')
-rwxr-xr-xgrpmi/grpmi.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/grpmi/grpmi.pl b/grpmi/grpmi.pl
index 3774aeec..43e88fb8 100755
--- a/grpmi/grpmi.pl
+++ b/grpmi/grpmi.pl
@@ -84,7 +84,8 @@ my $cache_location = '/var/cache/urpmi/rpms';
for (my $i=0; $i<@ARGV; $i++) {
if ($ARGV[$i] =~ m,^http://|^https://|^ftp://,) {
$label->set(_("Downloading package `%s'...", basename($ARGV[$i]))); select(undef, undef, undef, 0.1); $mainw->flush; #- hackish :-(
- my $res = curl_download::download($ARGV[$i], $cache_location, $proxy, sub { $progressbar->update($_[1]/$_[0]); $mainw->flush });
+ my $res = curl_download::download($ARGV[$i], $cache_location, $proxy,
+ sub { $_[0] and $progressbar->update($_[1]/$_[0]); $mainw->flush });
my $url = $ARGV[$i];
$ARGV[$i] = "$cache_location/" . basename($ARGV[$i]);
if ($res) {