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:39:29 +0000 (09:39 +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)

util/copy.pl

index c4aeea6a18cdf667231dbf357f9abddf6602bc6f..f93fb251db52b1618431ce0c0091e27619f79d89 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, $_;
                }