summaryrefslogtreecommitdiffstats
path: root/urpm/download.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm/download.pm')
-rw-r--r--urpm/download.pm7
1 files changed, 4 insertions, 3 deletions
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 .= $_;