util/copy.pl: work around glob quirk in some of earlier 5.1x Perl versions.
[openssl.git] / 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...
                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, $_;
                }
                {
                push @filelist, $_;
                }