summaryrefslogtreecommitdiffstats
path: root/urpm/parallel_ssh.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-09 20:44:18 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-09 20:44:18 +0000
commit29cb5aa0bcd107fb0af89b0433daefe08487d74d (patch)
treef762787bf0e87a596ea2e525a412b45551247f35 /urpm/parallel_ssh.pm
parent9d3c0b101b9f56ffd2b9a236a636f0ad8b7216db (diff)
downloadurpmi-29cb5aa0bcd107fb0af89b0433daefe08487d74d.tar
urpmi-29cb5aa0bcd107fb0af89b0433daefe08487d74d.tar.gz
urpmi-29cb5aa0bcd107fb0af89b0433daefe08487d74d.tar.bz2
urpmi-29cb5aa0bcd107fb0af89b0433daefe08487d74d.tar.xz
urpmi-29cb5aa0bcd107fb0af89b0433daefe08487d74d.zip
don't use a regexp, it's unsafe without \Q
Diffstat (limited to 'urpm/parallel_ssh.pm')
-rw-r--r--urpm/parallel_ssh.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/urpm/parallel_ssh.pm b/urpm/parallel_ssh.pm
index 4b11e8c7..02f59f06 100644
--- a/urpm/parallel_ssh.pm
+++ b/urpm/parallel_ssh.pm
@@ -25,8 +25,9 @@ sub scp_rpms {
foreach my $host (keys %{$parallel->{nodes}}) {
$urpm->{log}("parallel_ssh: scp @files $host:$urpm->{cachedir}/rpms");
if (_localhost($host)) {
- my @f = grep { ! m!^$urpm->{cachedir}/rpms! } @files;
- @f and system('cp', @f, "$urpm->{cachedir}/rpms");
+ if (my @f = grep { dirname($_) ne "$urpm->{cachedir}/rpms" } @files) {
+ system('cp', @f, "$urpm->{cachedir}/rpms");
+ }
} else {
system('scp', @files, "$host:$urpm->{cachedir}/rpms");
}