From: stevenknight Date: Mon, 12 Aug 2002 17:53:04 +0000 (+0000) Subject: Redo the uppercasing of drives on win32 fix. (Anthony Roach) X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=37eae72aa1040b178b8d52796e15da8464c5cf0a;p=scons.git Redo the uppercasing of drives on win32 fix. (Anthony Roach) git-svn-id: http://scons.tigris.org/svn/scons/trunk@437 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/etc/TestCmd.py b/etc/TestCmd.py index 17d520bd..27184947 100644 --- a/etc/TestCmd.py +++ b/etc/TestCmd.py @@ -610,6 +610,11 @@ class TestCmd: cwd = os.getcwd() os.chdir(path) self.workdir = os.getcwd() + # Uppercase the drive letter since the case of drive + # letters is pretty much random on win32: + drive,rest = os.path.splitdrive(self.workdir) + if drive: + self.workdir = string.upper(drive) + rest os.chdir(cwd) else: self.workdir = None diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index 1c90ea8f..846ebd84 100644 --- a/src/engine/SCons/Node/FS.py +++ b/src/engine/SCons/Node/FS.py @@ -164,9 +164,9 @@ class FS: drive, path_first = os.path.splitdrive(path_comp[0]) if not path_first: # Absolute path - drive_path = _my_normcase(drive) + drive = _my_normcase(drive) try: - directory = self.Root[drive_path] + directory = self.Root[drive] except KeyError: if not create: raise UserError @@ -174,7 +174,7 @@ class FS: dir.path = dir.path + os.sep dir.abspath = dir.abspath + os.sep dir.srcpath = dir.srcpath + os.sep - self.Root[drive_path] = dir + self.Root[drive] = dir directory = dir path_comp = path_comp[1:] else: