From c73ea3828e8455babf7ce27a63ae7963f9e095f8 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Fri, 27 Jan 2006 15:52:11 +0000 Subject: Add "B" suffix by default to the limit-rate option for curl (see bug 20859) --- urpm/download.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'urpm/download.pm') diff --git a/urpm/download.pm b/urpm/download.pm index 009c2139..ff57a9d4 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -269,6 +269,10 @@ sub sync_curl { -x "/usr/bin/curl" or die N("curl is missing\n"); my $options = shift @_; $options = { dir => $options } if !ref $options; + if (defined $options->{limit_rate} && $options->{limit_rate} =~ /\d$/) { + #- use bytes by default + $options->{limit_rate} .= 'B'; + } #- force download to be done in cachedir to avoid polluting cwd, #- however for curl, this is mandatory. my $cwd = getcwd(); -- cgit v1.2.1