Fixed bug that caused pathname to be improperly calculated when the the constructure first populated RenameTargets classes.
1 parent 85400e9 commit 4edf3d612f5ea69d06e01bad623d9aafdd4d79e1
@tundra tundra authored on 16 Mar 2010
Showing 1 changed file
View
6
tren.py
 
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
 
 
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]))
 
# 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
 
else: