From 043c1b4c682b708b7b02a17d33fb7c25ea299610 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 29 Jul 2004 02:18:21 +0000 Subject: Cleanups. --- urpm/download.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'urpm/download.pm') diff --git a/urpm/download.pm b/urpm/download.pm index d5ad44f1..539438e0 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -368,16 +368,16 @@ sub sync_rsync { foreach (@_) { my $count = 10; #- retry count on error (if file exists). my $basename = basename($_); - my ($file) = m!^rsync://[^\/]*::! ? (m|^rsync://(.*)|) : ($_); + my $file = m!^rsync://([^/]*::.*)! ? $1 : $_; propagate_sync_callback($options, 'start', $file); do { local $_; my $buf = ''; open my $rsync, join(" ", "/usr/bin/rsync", - ($limit_rate ? "--bwlimit=$limit_rate" : ()), + ($limit_rate ? "--bwlimit=$limit_rate" : @{[]}), ($options->{quiet} ? qw(-q) : qw(--progress -v)), - ($options->{compress} ? qw(-z) : ()), - ($options->{ssh} ? qw(-e ssh) : ()), + ($options->{compress} ? qw(-z) : @{[]}), + ($options->{ssh} ? qw(-e ssh) : @{[]}), qw(--partial --no-whole-file), "'$file' '$options->{dir}' |"); local $/ = \1; #- read input by only one char, this is slow but very nice (and it works!). @@ -404,7 +404,7 @@ sub sync_rsync { sub sync_ssh { -x "/usr/bin/ssh" or die N("ssh is missing\n"); - my $options =shift(@_); + my $options = shift(@_); $options->{ssh} = 1; sync_rsync($options, @_); } -- cgit v1.2.1