2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 02:49:00 +00:00

Improve how qtest finds windows /bin

This commit is contained in:
Jay Berkenbilt 2019-08-18 15:31:47 -04:00
parent 89dacd8eba
commit c032f7c972

View File

@ -1780,10 +1780,7 @@ sub winrun
my $tempfilename = "$tempdir/winrun.tmp";
if (! defined $winbin)
{
my $comspec = $ENV{'COMSPEC'};
$comspec =~ s,\\,/,g;
if ((system("sh -c 'cd /bin; $comspec /c cd'" .
" > $tempfilename") == 0) &&
if ((system("sh -c 'cd /bin; pwd -W' > $tempfilename") == 0) &&
open(F, "<$tempfilename"))
{
$winbin = <F>;