diff --git a/twander.py b/twander.py index a4ce4d6..27b4baf 100755 --- a/twander.py +++ b/twander.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "twander" -RCSID = "$Id: twander.py,v 3.199 2006/12/14 19:10:57 tundra Exp $" +RCSID = "$Id: twander.py,v 3.200 2006/12/14 22:48:05 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -3627,7 +3627,12 @@ selected = UI.Associations[assoc] assocfound = True - if not assocfound and (ASSOCDFLT in UI.Associations): + # If we did not find a file association and a default + # 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] # And execute the command