diff --git a/tren.py b/tren.py index 1245396..244016a 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.204 2010/03/19 02:07:02 tundra Exp $" +RCSID = "$Id: tren.py,v 1.205 2010/03/19 02:57:35 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -632,10 +632,16 @@ except (IOError, OSError) as e: ErrorMsg(eFILEOPEN % (fullname, e.args[1])) + # Some operating systems (Windows) terminate the path with + # a separator, some (Posix) do not. + + if pathname[-1] != os.sep: + pathname += os.sep + # Store fullname, basename, and stat info for this file if basename: - self.RenNames[fullname] = {BASE : basename, PATHNAME : pathname + os.sep, STATS : stats} + self.RenNames[fullname] = {BASE : basename, PATHNAME : pathname, STATS : stats} # Catch the case where they're trying to rename the root of the directory tree