diff --git a/twander.py b/twander.py index 296c9d4..165f826 100755 --- a/twander.py +++ b/twander.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "twander" -RCSID = "$Id: twander.py,v 3.201 2006/12/14 23:05:15 tundra Exp $" +RCSID = "$Id: twander.py,v 3.202 2006/12/15 04:24:02 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -3608,12 +3608,7 @@ elif (OSPLATFORM == 'win32') or (OSNAME == 'posix'): - # Set OS-Specific command invocation options - - if OSPLATFORM == 'win32': - usestartdir=True - else: - usestartdir=False + usestartdir=False # Apply any relevant association information @@ -3627,7 +3622,6 @@ # association is defined, apply it to everything # except executable files. - if not assocfound and (ASSOCDFLT in UI.Associations) and not (os.stat(selected)[ST_MODE] & (S_IXUSR|S_IXGRP|S_IXOTH)): selected = UI.Associations[ASSOCDFLT] assocfound = True @@ -3639,6 +3633,13 @@ if not assocfound: selected = os.path.join(os.path.abspath(UI.CurrentDir), selected) + # Win32 has a special command interface wherein its internal associations + # are applied. We only invoke command execution this way when twander + # found no associations of its own. + + if OSPLATFORM == 'win32': + usestartdir=True + # Now execute the command ExecuteCommand(selected, '', ResolveVars=True, ResolveBuiltIns=True, UseStartDir=usestartdir)