From 9f2deda929513ebde215422395692767c5d7fde6 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Tue, 3 May 2016 20:59:52 +1000 Subject: [PATCH] Added check for executable permissions to ImageShow --- PIL/ImageShow.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PIL/ImageShow.py b/PIL/ImageShow.py index 51417c30b..16c845f53 100644 --- a/PIL/ImageShow.py +++ b/PIL/ImageShow.py @@ -139,8 +139,7 @@ else: return None for dirname in path.split(os.pathsep): filename = os.path.join(dirname, executable) - if os.path.isfile(filename): - # FIXME: make sure it's executable + if os.path.isfile(filename) and os.access(filename, os.X_OK): return filename return None