2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 10:58:58 +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"; my $tempfilename = "$tempdir/winrun.tmp";
if (! defined $winbin) if (! defined $winbin)
{ {
my $comspec = $ENV{'COMSPEC'}; if ((system("sh -c 'cd /bin; pwd -W' > $tempfilename") == 0) &&
$comspec =~ s,\\,/,g;
if ((system("sh -c 'cd /bin; $comspec /c cd'" .
" > $tempfilename") == 0) &&
open(F, "<$tempfilename")) open(F, "<$tempfilename"))
{ {
$winbin = <F>; $winbin = <F>;