mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Backport fix for finding executables from 5.0
mysql-test/lib/mtr_misc.pl: On windows the exe does not need to be executable for it to be found
This commit is contained in:
parent
4934231545
commit
72695c3fae
1 changed files with 16 additions and 2 deletions
|
@ -82,7 +82,14 @@ sub mtr_path_exists (@) {
|
|||
sub mtr_script_exists (@) {
|
||||
foreach my $path ( @_ )
|
||||
{
|
||||
return $path if -x $path;
|
||||
if($::glob_win32)
|
||||
{
|
||||
return $path if -f $path;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $path if -x $path;
|
||||
}
|
||||
}
|
||||
if ( @_ == 1 )
|
||||
{
|
||||
|
@ -99,7 +106,14 @@ sub mtr_exe_exists (@) {
|
|||
map {$_.= ".exe"} @path if $::glob_win32;
|
||||
foreach my $path ( @path )
|
||||
{
|
||||
return $path if -x $path;
|
||||
if($::glob_win32)
|
||||
{
|
||||
return $path if -f $path;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $path if -x $path;
|
||||
}
|
||||
}
|
||||
if ( @path == 1 )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue