summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm/download.pm4
1 files changed, 4 insertions, 0 deletions
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();