util/copy.pl: work around glob quirk in some of earlier 5.1x Perl versions.
[openssl.git] / util / copy.pl
index c4bcccdee6b318ed8cc6701c9a67c4bf21d8f607..f93fb251db52b1618431ce0c0091e27619f79d89 100644 (file)
@@ -26,6 +26,7 @@ foreach $arg (@ARGV) {
                next;
                }
        $arg =~ s|\\|/|g;       # compensate for bug/feature in cygwin glob...
+       $arg = qq("$arg") if ($arg =~ /\s/);    # compensate for bug in 5.10...
        foreach (glob $arg)
                {
                push @filelist, $_;
@@ -40,7 +41,7 @@ if ($fnum <= 1)
        }
 
 $dest = pop @filelist;
-       
+
 if ($fnum > 2 && ! -d $dest)
        {
        die "Destination must be a directory";
@@ -73,5 +74,5 @@ foreach (@filelist)
        close(OUT);
        print "Copying: $_ to $dfile\n";
        }
-               
+