Fixed trailing separator bug in pathname that made Windows report differently on root directory file renames.
1 parent 362e013 commit dadbeec2f95bb29c358433dd3c10b045343e621d
@tundra tundra authored on 18 Mar 2010
Showing 1 changed file
View
10
tren.py
 
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
 
stats = os.stat(fullname)
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
 
else: