Added check for executable permissions to ImageShow

This commit is contained in:
Andrew Murray 2016-05-03 20:59:52 +10:00
parent 12bd44a6fb
commit 9f2deda929

View File

@ -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