From f5855746fe0851e5a80b32061cb819021285ff25 Mon Sep 17 00:00:00 2001
From: Greg Ward <gward@python.net>
Date: Thu, 21 Sep 2000 01:23:35 +0000
Subject: Corran Webster: fix 'change_root()' to handle Mac OS paths.

---
 Lib/distutils/util.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index 4688871..b60e39c 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -100,7 +100,13 @@ def change_root (new_root, pathname):
         return os.path.join (new_root, path)
 
     elif os.name == 'mac':
-        raise RuntimeError, "no clue how to do this on Mac OS"
+        if not os.path.isabs(pathname):
+            return os.path.join(new_root, pathname)
+        else:
+            # Chop off volume name from start of path
+            elements = string.split(pathname, ":", 1)
+            pathname = ":" + elements[1]
+            return os.path.join(new_root, pathname)
 
     else:
         raise DistutilsPlatformError, \
-- 
cgit v0.12

