summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-04-20 15:28:48 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-04-20 15:28:48 +0000
commit9a6980807657b74b160234cbb527bd0142eaa26f (patch)
tree1ffabf6229d8a04fb566025fbdc05ab109c195cd /urpm
parentd030d51124b415c8bf58dba4b610d91cce5d0245 (diff)
downloadurpmi-9a6980807657b74b160234cbb527bd0142eaa26f.tar
urpmi-9a6980807657b74b160234cbb527bd0142eaa26f.tar.gz
urpmi-9a6980807657b74b160234cbb527bd0142eaa26f.tar.bz2
urpmi-9a6980807657b74b160234cbb527bd0142eaa26f.tar.xz
urpmi-9a6980807657b74b160234cbb527bd0142eaa26f.zip
Untaint current dir when temporarily chdir'ing to cache
Diffstat (limited to 'urpm')
-rw-r--r--urpm/download.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/urpm/download.pm b/urpm/download.pm
index 354ab897..81a45f93 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -207,7 +207,7 @@ sub sync_wget {
my $options = shift;
$options = { dir => $options } if !ref $options;
#- force download to be done in cachedir to avoid polluting cwd.
- my $cwd = getcwd();
+ (my $cwd) = getcwd() =~ /(.*)/;
chdir $options->{dir};
my ($buf, $total, $file) = ('', undef, undef);
my $wget_command = join(" ", map { "'$_'" }
@@ -275,7 +275,7 @@ sub sync_curl {
}
#- force download to be done in cachedir to avoid polluting cwd,
#- however for curl, this is mandatory.
- my $cwd = getcwd();
+ (my $cwd) = getcwd() =~ /(.*)/;
chdir($options->{dir});
my (@ftp_files, @other_files);
foreach (@_) {
@@ -424,7 +424,7 @@ sub sync_rsync {
my $options = shift;
$options = { dir => $options } if !ref $options;
#- force download to be done in cachedir to avoid polluting cwd.
- my $cwd = getcwd();
+ (my $cwd) = getcwd() =~ /(.*)/;
chdir($options->{dir});
my $limit_rate = _calc_limit_rate $options->{limit_rate};
foreach (@_) {