diff --git a/tren.py b/tren.py index 3ad73fb..0c889b2 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.216 2010/04/05 20:35:28 tundra Exp $" +RCSID = "$Id: tren.py,v 1.217 2010/04/07 18:36:55 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -442,7 +442,7 @@ TOKMYEAR : ("%04d", "ST_MTIME", "tm_year") } -# Alphabets - The User Can Add To These +# Alphabets - The user can add to these on the command line ALPHABETS = { @@ -450,8 +450,6 @@ DECIMAL : ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], - OCTAL : ["0", "1", "2", "3", "4", "5", "6", "7"], - HEXLOWER : ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"], HEXUPPER : ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"], @@ -464,6 +462,8 @@ "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"], + OCTAL : ["0", "1", "2", "3", "4", "5", "6", "7"], + UPPER : ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" ], @@ -1070,7 +1070,7 @@ if ProgramOptions[BACKUPS]: - bkuname = newname + ProgramOptions[EXISTSUFFIX] + bkuname = oldname + ProgramOptions[EXISTSUFFIX] InfoMsg(indent + iRENFORCED % fullnew) self.__RenameIt(pathname, newname, bkuname) @@ -1353,7 +1353,7 @@ found = False for seqtoken in self.SortViews.keys() + [ORDERBYADATE, ORDERBYCDATE, ORDERBYMDATE]: - if token.startswith(seqtoken): + if token.split(ALPHADELIM)[0] == (seqtoken): token, field = token[:len(seqtoken)], token[len(seqtoken):] found = True