summaryrefslogtreecommitdiffstats
path: root/urpm/download.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm/download.pm')
-rw-r--r--urpm/download.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/urpm/download.pm b/urpm/download.pm
index 8086bd20..77ef36b1 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -609,7 +609,6 @@ sub sync_aria2 {
#- force download to be done in cachedir to avoid polluting cwd.
(my $cwd) = getcwd() =~ /(.*)/;
chdir $options->{dir};
- my ($buf, $_total, $file) = ('', undef, undef);
my @files = uniq(map {
my $metalinkfile = $_;
@@ -635,6 +634,8 @@ sub sync_aria2 {
my $aria2_pid = open(my $aria2, "$aria2c_command |");
+ my ($buf, $_total, $file) = ('', undef, undef);
+
local $/ = \1; #- read input by only one char, this is slow but very nice (and it works!).
local $_;