diff --git a/tren.py b/tren.py index 1c6164d..fb6538d 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.194 2010/03/16 20:43:04 tundra Exp $" +RCSID = "$Id: tren.py,v 1.195 2010/03/16 21:00:20 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -549,7 +549,7 @@ for fullname in targs: try: - basename = os.path.basename(fullname) + pathname, basename = os.path.split(fullname) stats = os.stat(fullname) except (IOError, OSError) as e: ErrorMsg(eFILEOPEN % (fullname, e.args[1])) @@ -557,7 +557,7 @@ # Store fullname, basename, and stat info for this file if basename: - self.RenNames[fullname] = {BASE : basename, PATHNAME : fullname.split(basename)[0], STATS : stats} + self.RenNames[fullname] = {BASE : basename, PATHNAME : pathname + os.sep, STATS : stats} # Catch the case where they're trying to rename the root of the directory tree