Redo the uppercasing of drives on win32 fix. (Anthony Roach)
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Mon, 12 Aug 2002 17:53:04 +0000 (17:53 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Mon, 12 Aug 2002 17:53:04 +0000 (17:53 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@437 fdb21ef1-2011-0410-befe-b5e4ea1792b1

etc/TestCmd.py
src/engine/SCons/Node/FS.py

index 17d520bd0e31c898abffad0f7ff08567475d59f7..27184947ca69287244a01bf0392ae74996381a11 100644 (file)
@@ -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
index 1c90ea8fa9bd6ae2d9ada0074469d53de77d018b..846ebd8484607cf70ff11e88f03d1a9752a8efbe 100644 (file)
@@ -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: