From 650ad9dc8875ddfc0a0db31cbca4111ada40c556 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 23 Mar 2017 16:59:02 -0300 Subject: [PATCH] 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 --- mesonbuild/dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py index e4317f1e1..031e10631 100644 --- a/mesonbuild/dependencies.py +++ b/mesonbuild/dependencies.py @@ -456,7 +456,7 @@ class ExternalProgram: if suffix in self.windows_exts: return True elif os.access(path, os.X_OK): - return True + return not os.path.isdir(path) return False def _search_dir(self, name, search_dir):