summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-08-11 16:45:22 +0000
committerFrancois Pons <fpons@mandriva.com>2003-08-11 16:45:22 +0000
commitde5c11648a4111906934cf84f53ece057ef4fd37 (patch)
tree4dea3a7fedbf5d58b87cdcde5fbde0de27e6a204
parentbd244806506af1afeee095c43709bd7bd326943a (diff)
downloadurpmi-de5c11648a4111906934cf84f53ece057ef4fd37.tar
urpmi-de5c11648a4111906934cf84f53ece057ef4fd37.tar.gz
urpmi-de5c11648a4111906934cf84f53ece057ef4fd37.tar.bz2
urpmi-de5c11648a4111906934cf84f53ece057ef4fd37.tar.xz
urpmi-de5c11648a4111906934cf84f53ece057ef4fd37.zip
fixed limit_rate without suffixes for rsync (division not as an integer)
-rw-r--r--urpm.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/urpm.pm b/urpm.pm
index a4195df7..0eec099a 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -224,7 +224,7 @@ sub sync_curl {
#- prepare to get back size and time stamp of each file.
open CURL, join(" ", map { "'$_'" } "/usr/bin/curl",
(ref($options) && $options->{limit_rate} ? ("--limit-rate", $options->{limit_rate}) : ()),
- (ref($options) && $options->{proxy} ? set_proxy({ type => "curl", proxy => $options->{proxy} }) : ()) .
+ (ref($options) && $options->{proxy} ? set_proxy({ type => "curl", proxy => $options->{proxy} }) : ()),
"--stderr", "-", "-s", "-I", @ftp_files) . " |";
while (<CURL>) {
if (/Content-Length:\s*(\d+)/) {
@@ -304,7 +304,7 @@ sub sync_rsync {
my $options = shift @_;
my $limit_rate = ref($options) && $options->{limit_rate};
for ($limit_rate) {
- /^(\d+)$/ and $limit_rate = $1/1024;
+ /^(\d+)$/ and $limit_rate = int $1/1024;
/^(\d+)[kK]$/ and $limit_rate = $1;
/^(\d+)[mM]$/ and $limit_rate = 1024*$1;
/^(\d+)[gG]$/ and $limit_rate = 1024*1024*$1;