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