From 4b97c6ca164273b220c1b1f5fdfa18b8ba28b0ca Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Mon, 12 Aug 2002 17:53:04 +0000 Subject: Redo the uppercasing of drives on win32 fix. (Anthony Roach) --- etc/TestCmd.py | 5 +++++ src/engine/SCons/Node/FS.py | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/etc/TestCmd.py b/etc/TestCmd.py index 17d520b..2718494 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 1c90ea8..846ebd8 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: -- cgit v0.12