提交 04b7805a 编写于 作者: R Richard Levitte

perl glob: make sure to put quotes around the pattern, in case of spaces

RT#4486
Reviewed-by: NMatt Caswell <matt@openssl.org>
上级 cb663908
...@@ -20,7 +20,7 @@ setup("test_ssl_new"); ...@@ -20,7 +20,7 @@ setup("test_ssl_new");
$ENV{TEST_CERTS_DIR} = srctop_dir("test", "certs"); $ENV{TEST_CERTS_DIR} = srctop_dir("test", "certs");
my @conf_srcs = glob(srctop_file("test", "ssl-tests", "*.conf.in")); my @conf_srcs = glob('"'.srctop_file("test", "ssl-tests", "*.conf.in").'"');
map { s/;.*// } @conf_srcs if $^O eq "VMS"; map { s/;.*// } @conf_srcs if $^O eq "VMS";
my @conf_files = map { basename($_) } @conf_srcs; my @conf_files = map { basename($_) } @conf_srcs;
map { s/\.in// } @conf_files; map { s/\.in// } @conf_files;
......
...@@ -42,13 +42,13 @@ my $list_mode = scalar(grep /^list$/, @tests) != 0; ...@@ -42,13 +42,13 @@ my $list_mode = scalar(grep /^list$/, @tests) != 0;
if (grep /^(alltests|list)$/, @tests) { if (grep /^(alltests|list)$/, @tests) {
@tests = grep { @tests = grep {
basename($_) =~ /^[0-9][0-9]-[^\.]*\.t$/ basename($_) =~ /^[0-9][0-9]-[^\.]*\.t$/
} glob(catfile($recipesdir,"*.t")); } glob('"'.catfile($recipesdir,"*.t").'"');
} else { } else {
my @t = (); my @t = ();
foreach (@tests) { foreach (@tests) {
push @t, grep { push @t, grep {
basename($_) =~ /^[0-9][0-9]-[^\.]*\.t$/ basename($_) =~ /^[0-9][0-9]-[^\.]*\.t$/
} glob(catfile($recipesdir,"*-$_.t")); } glob('"'.catfile($recipesdir,"*-$_.t").'"');
} }
@tests = @t; @tests = @t;
} }
......
...@@ -72,9 +72,9 @@ my $symlink_exists = eval { symlink("",""); 1 }; ...@@ -72,9 +72,9 @@ my $symlink_exists = eval { symlink("",""); 1 };
foreach my $subdir (keys %{$options{subdir}}) { foreach my $subdir (keys %{$options{subdir}}) {
my $section = $options{subdir}->{$subdir}; my $section = $options{subdir}->{$subdir};
my $podsourcedir = catfile($options{sourcedir}, $subdir); my $podsourcedir = catfile($options{sourcedir}, $subdir);
my $podglob = catfile($podsourcedir, "*.pod"); my $podglob = '"'.catfile($podsourcedir, "*.pod").'"';
foreach my $podfile (glob "$podglob") { foreach my $podfile (glob $podglob) {
my $podname = basename($podfile, ".pod"); my $podname = basename($podfile, ".pod");
my $podpath = catfile($podfile); my $podpath = catfile($podfile);
my %podinfo = ( section => $section ); my %podinfo = ( section => $section );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册