Never accept a directory as being an executable program

Otherwise we will possibly use a subfolder with the name an
executable we are looking for as an executable
pull/1502/merge
Thibault Saunier 8 years ago committed by Jussi Pakkanen
parent 3f8b010670
commit 650ad9dc88
  1. 2
      mesonbuild/dependencies.py

@ -456,7 +456,7 @@ class ExternalProgram:
if suffix in self.windows_exts: if suffix in self.windows_exts:
return True return True
elif os.access(path, os.X_OK): elif os.access(path, os.X_OK):
return True return not os.path.isdir(path)
return False return False
def _search_dir(self, name, search_dir): def _search_dir(self, name, search_dir):

Loading…
Cancel
Save