Commit ec1f37f7 authored by Greg Ward's avatar Greg Ward

Corran Webster: fix 'change_root()' to handle Mac OS paths.

parent 5054d122
......@@ -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, \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment