diff --git a/twander.py b/twander.py index 27b4baf..296c9d4 100755 --- a/twander.py +++ b/twander.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "twander" -RCSID = "$Id: twander.py,v 3.200 2006/12/14 22:48:05 tundra Exp $" +RCSID = "$Id: twander.py,v 3.201 2006/12/14 23:05:15 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -3615,10 +3615,6 @@ else: usestartdir=False - # Create absolute path to selected command - - selected = os.path.join(os.path.abspath(UI.CurrentDir), selected) - # Apply any relevant association information assocfound = False @@ -3634,8 +3630,16 @@ 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 - # And execute the command + + # If there is NOT an association, create absolute path to + # selected command + + if not assocfound: + selected = os.path.join(os.path.abspath(UI.CurrentDir), selected) + + # Now execute the command ExecuteCommand(selected, '', ResolveVars=True, ResolveBuiltIns=True, UseStartDir=usestartdir)