diff options
author | Francois Pons <fpons@mandriva.com> | 2003-08-11 16:45:22 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-08-11 16:45:22 +0000 |
commit | de5c11648a4111906934cf84f53ece057ef4fd37 (patch) | |
tree | 4dea3a7fedbf5d58b87cdcde5fbde0de27e6a204 /urpm.pm | |
parent | bd244806506af1afeee095c43709bd7bd326943a (diff) | |
download | urpmi-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)
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |