mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-03 03:13:04 +03:00
Merge pull request #1880 from radarhere/access
Added check for executable permissions to ImageShow
This commit is contained in:
commit
5afa5532f8
|
@ -139,8 +139,7 @@ else:
|
||||||
return None
|
return None
|
||||||
for dirname in path.split(os.pathsep):
|
for dirname in path.split(os.pathsep):
|
||||||
filename = os.path.join(dirname, executable)
|
filename = os.path.join(dirname, executable)
|
||||||
if os.path.isfile(filename):
|
if os.path.isfile(filename) and os.access(filename, os.X_OK):
|
||||||
# FIXME: make sure it's executable
|
|
||||||
return filename
|
return filename
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user