diff --git a/tren.py b/tren.py index 5f7fac5..f8e6ff2 100755 --- a/tren.py +++ b/tren.py @@ -8,7 +8,7 @@ PROGNAME = "tren.py" BASENAME = PROGNAME.split(".py")[0] PROGENV = BASENAME.upper() -RCSID = "$Id: tren.py,v 1.206 2010/03/19 16:25:57 tundra Exp $" +RCSID = "$Id: tren.py,v 1.207 2010/03/19 17:50:22 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -1910,18 +1910,16 @@ # renamed. -# Do wildcard expansion for Windows systems because they have a -# brain-damaged shell. +# Do wildcard expansion on the rename targets because they may +# have come from an include file (where they are not expanded) +# or from a Windows shell that doesn't know how to handle globbing +# properly. -if WINDOWS: +expandedlist = [] +for arg in args: + expandedlist += glob.glob(arg) - expandedlist = [] - for arg in args: - expandedlist += glob.glob(arg) - - args = expandedlist - -targs = RenameTargets(args) +targs = RenameTargets(expandedlist) # Now process the options