Eliminate an exception when using -U.
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sun, 8 Sep 2002 04:13:20 +0000 (04:13 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sun, 8 Sep 2002 04:13:20 +0000 (04:13 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@463 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/CHANGES.txt
src/engine/SCons/Node/FS.py
src/engine/SCons/Node/FSTests.py
test/option--U.py

index 1a00b438eaf6d038db9f58fb4917517fa2c1f261..ea65a0a9b174090f9790202d9c2ad40221c92cc1 100644 (file)
@@ -32,6 +32,9 @@ RELEASE 0.09 -
   - Fix the ASPPCOM values for the GNU assembler.
     (Bug reported by Brett Polivka.)
 
+  - Fix an exception thrown when a Default() directory was specified
+    when using the -U option.
+
  From Anthony Roach:
 
  - Fixed use of command lines with spaces in their arguments,
index 96381e3b3a620c75f9e7aecdbb55265147ce2317..c4b220f210153d547dd10379ce78daac0c163006 100644 (file)
@@ -496,6 +496,7 @@ class Dir(Entry):
         self.entries = {}
         self.entries['.'] = self
         self.entries['..'] = self.dir
+        self.cwd = self
         self.builder = 1
         self._sconsign = None
 
index 3bba3f4d33bda9407342988f2dfc5a8198d8e102..f87abe7f91601a5f8330b50b10a891632b854c14 100644 (file)
@@ -203,6 +203,7 @@ class FSTestCase(unittest.TestCase):
         fs = SCons.Node.FS.FS()
 
         d1 = fs.Dir('d1')
+        assert d1.cwd is d1, d1
 
         f1 = fs.File('f1', directory = d1)
 
index d2c518d3aa1366cb79705d8f355a9c3ef52339da..23e82b18c30c2f78684fd92e94d7ba5401782d8b 100644 (file)
@@ -134,4 +134,14 @@ test.fail_test(os.path.exists(test.workpath('bar.out')))
 test.fail_test(os.path.exists(test.workpath('sub2/xxx.out')))
 
 
+# Make sure that a Default() directory doesn't cause an exception.
+test.subdir('sub4')
+
+test.write(['sub4', 'SConstruct'], """
+Default('.')
+""")
+
+test.run(chdir = 'sub4', arguments = '-U')
+
+
 test.pass_test()