* src/plugins/GraphViz.py: launch image viewer in Windows.
* src/Mime/_WinMime.py: handle rundll32.exe applications. * src/Utils.py: search path in Windows when looking for applications. svn: r7055
This commit is contained in:
14
src/Utils.py
14
src/Utils.py
@ -461,10 +461,16 @@ def search_for(name):
|
||||
name = name.split('"')[1]
|
||||
else:
|
||||
name = name.split()[0]
|
||||
for i in os.environ['PATH'].split(':'):
|
||||
fname = os.path.join(i,name)
|
||||
if os.access(fname,os.X_OK) and not os.path.isdir(fname):
|
||||
return 1
|
||||
if os.sys.platform == "win32":
|
||||
for i in os.environ['PATH'].split(';'):
|
||||
fname = os.path.join(i,name)
|
||||
if os.access(fname,os.X_OK) and not os.path.isdir(fname):
|
||||
return 1
|
||||
else:
|
||||
for i in os.environ['PATH'].split(':'):
|
||||
fname = os.path.join(i,name)
|
||||
if os.access(fname,os.X_OK) and not os.path.isdir(fname):
|
||||
return 1
|
||||
return 0
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user