summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm')
-rw-r--r--urpm/download.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/urpm/download.pm b/urpm/download.pm
index 26bcaa34..18888b44 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -262,7 +262,8 @@ sub sync_wget {
$total = '';
} elsif (defined $total && $total eq '' && $buf =~ /^[^:]*:\s+(\d\S*)/) {
$total = $1;
- } elsif (my ($percent, $speed, $eta) = $buf =~ /^\s*(\d+)%.*\s+(\S+)\s+ETA\s+(\S+)\s*[\r\n]$/ms) {
+ } elsif (defined $total && $buf =~ /^\s*(\d+)%.*\s+(\S+)\s+ETA\s+(\S+)\s*[\r\n]$/ms) {
+ my ($percent, $speed, $eta) = ($1, $2, $3);
if (propagate_sync_callback($options, 'progress', $file, $percent, $total, $eta, $speed) eq 'canceled') {
kill 15, $wget_pid;
close $wget;