summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm')
-rw-r--r--urpm/download.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/urpm/download.pm b/urpm/download.pm
index 23b2d273..8de73e07 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -341,15 +341,15 @@ sub sync_curl {
$file = shift @l;
propagate_sync_callback($options, 'start', $file);
}
- if (my ($percent, $total, $eta, $speed) = $buf =~ /^\s*(\d+)\s+(\S+)[^\r\n]*\s+(\S+)\s+-?(\S+)\s*[\r\n]$/ms) {
+ if (my ($percent, $total, $eta, $speed) = $buf =~ /^\s*(\d+)\s+(\S+)[^\r\n]*\s+(\S+)\s+(\S+)\s*[\r\n]$/ms) {
+ $speed =~ s/^-//;
if (propagate_sync_callback($options, 'progress', $file, $percent, $total, $eta, $speed) eq 'canceled') {
kill 15, $curl_pid;
close $curl;
return;
}
- #- this regexp checks that download has actually started
- #- (work around a bug in curl 7.12.2 output when 302 answers are involved)
- if ($_ eq "\n" && ($percent == 100 || $buf !~ /--:--:--/)) {
+ #- this checks that download has actually started
+ if ($_ eq "\n") {
propagate_sync_callback($options, 'end', $file);
$file = undef;
}