From 0d5d76c81a420eb243a9a91327c494a8fd5b189f Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Tue, 7 Nov 2017 21:38:30 +0100 Subject: [PATCH] util/copy.pl: work around glob quirk in some of earlier 5.1x Perl versions. In earlier 5.1x Perl versions quoting globs works only if there is white space. If there is none, it's looking for names starting with ". Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/4696) --- util/copy-if-different.pl | 3 ++- util/copy.pl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/util/copy-if-different.pl b/util/copy-if-different.pl index e1245f54af..5420f3f2bd 100644 --- a/util/copy-if-different.pl +++ b/util/copy-if-different.pl @@ -12,7 +12,8 @@ my @filelist; foreach my $arg (@ARGV) { $arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob... - foreach (glob qq("$arg")) + $arg = qq("$arg") if ($arg =~ /\s/); # compensate for bug in 5.10... + foreach (glob $arg) { push @filelist, $_; } diff --git a/util/copy.pl b/util/copy.pl index a6b2a54ec6..9c0e68c414 100644 --- a/util/copy.pl +++ b/util/copy.pl @@ -19,7 +19,8 @@ foreach $arg (@ARGV) { next; } $arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob... - foreach (glob qq("$arg")) + $arg = qq("$arg") if ($arg =~ /\s/); # compensate for bug in 5.10... + foreach (glob $arg) { push @filelist, $_; } -- 2.34.1