summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Node/FSTests.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2005-11-19 16:26:31 (GMT)
committerSteven Knight <knight@baldmt.com>2005-11-19 16:26:31 (GMT)
commit70a70c501294fcb6ce2a3a002260715c365cb00e (patch)
tree6cdd8dda6d3eb1488c44d2c8b7cbae05008f5ca8 /src/engine/SCons/Node/FSTests.py
parent3f61bbb849eeb07e5683d11c3769b25f64c350fe (diff)
downloadSCons-70a70c501294fcb6ce2a3a002260715c365cb00e.zip
SCons-70a70c501294fcb6ce2a3a002260715c365cb00e.tar.gz
SCons-70a70c501294fcb6ce2a3a002260715c365cb00e.tar.bz2
Support specifying absolute path names without drive letters on Win32.
Diffstat (limited to 'src/engine/SCons/Node/FSTests.py')
-rw-r--r--src/engine/SCons/Node/FSTests.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py
index 565384f..cb98f50 100644
--- a/src/engine/SCons/Node/FSTests.py
+++ b/src/engine/SCons/Node/FSTests.py
@@ -854,9 +854,11 @@ class FSTestCase(_tempdirTestCase):
if os.sep != '/':
seps = seps + ['/']
+ drive, path = os.path.splitdrive(os.getcwd())
+
for sep in seps:
- def Dir_test(lpath, path_, abspath_, up_path_, fileSys=fs, s=sep):
+ def Dir_test(lpath, path_, abspath_, up_path_, fileSys=fs, s=sep, drive=drive):
dir = fileSys.Dir(string.replace(lpath, '/', s))
if os.sep != '/':
@@ -864,9 +866,11 @@ class FSTestCase(_tempdirTestCase):
abspath_ = string.replace(abspath_, '/', os.sep)
up_path_ = string.replace(up_path_, '/', os.sep)
- def strip_slash(p):
+ def strip_slash(p, drive=drive):
if p[-1] == os.sep and len(p) > 1:
p = p[:-1]
+ if p[0] == os.sep:
+ p = drive + p
return p
path = strip_slash(path_)
abspath = strip_slash(abspath_)