Merge pull request #1880 from radarhere/access

Added check for executable permissions to ImageShow
This commit is contained in:
wiredfool 2016-05-03 21:25:23 +01:00
commit 5afa5532f8

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