[Emrys] 2896: Macports 3.0.4 cannot view images

svn: r12713
This commit is contained in:
Benny Malengier 2009-06-26 09:43:55 +00:00
parent 52e908a5a1
commit eb337a8d29

View File

@ -1134,8 +1134,12 @@ def open_file_with_default_application( file_path ):
ErrorDialog(_("Error Opening File"), str(msg))
else:
search = os.environ['PATH'].split(':')
if os.sys.platform='darwin':
utility = 'open'
else:
utility = 'xdg-open'
for lpath in search:
prog = os.path.join(lpath, 'xdg-open')
prog = os.path.join(lpath, utility)
if os.path.isfile(prog):
os.spawnvpe(os.P_NOWAIT, prog, [prog, norm_path], os.environ)
return