util/copy.pl: work around glob quirk in some of earlier 5.1x Perl versions.
authorAndy Polyakov <appro@openssl.org>
Tue, 7 Nov 2017 19:59:00 +0000 (20:59 +0100)
committerAndy Polyakov <appro@openssl.org>
Fri, 10 Nov 2017 08:41:16 +0000 (09:41 +0100)
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 <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4695)

(cherry picked from commit 1097d2a39e3f85d4dac2c4d1c238792d6e1d959f)

util/copy.pl

index ef4d8708e24789cc3cfc50fa77ca5f4c7481bbbe..01964f585e87c6adf0ccf926f5be4ce0e53f4c43 100644 (file)
@@ -26,7 +26,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, $_;
                }