From 79da5f7c7fabfefd8295395f9e2c8fd57e58e43e Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Fri, 2 Dec 2005 15:21:14 +0000 Subject: Fix download with wget, broken by latest changes --- urpm/download.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'urpm') diff --git a/urpm/download.pm b/urpm/download.pm index afde787e..92c35945 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -207,7 +207,7 @@ sub sync_wget { my $cwd = getcwd(); chdir $options->{dir}; my ($buf, $total, $file) = ('', undef, undef); - my $wget_pid = open my $wget, join(" ", map { "'$_'" } + my $wget_command = join(" ", map { "'$_'" } #- construction of the wget command-line "/usr/bin/wget", ($options->{limit_rate} ? "--limit-rate=$options->{limit_rate}" : ()), @@ -219,11 +219,12 @@ sub sync_wget { "--retr-symlinks", "--no-check-certificate", "--timeout=$CONNECT_TIMEOUT", - "-NP", + "-N", (defined $options->{'wget-options'} ? split /\s+/, $options->{'wget-options'} : ()), - $options->{dir}, + '-P', $options->{dir}, @_ ) . " |"; + my $wget_pid = open my $wget, $wget_command; local $/ = \1; #- read input by only one char, this is slow but very nice (and it works!). while (<$wget>) { $buf .= $_; -- cgit v1.2.1