From: stevenknight Date: Sun, 8 Sep 2002 04:13:20 +0000 (+0000) Subject: Eliminate an exception when using -U. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9aedcc649cfb9cc9058d76b401db03fb11ec1b87;p=scons.git Eliminate an exception when using -U. git-svn-id: http://scons.tigris.org/svn/scons/trunk@463 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 1a00b438..ea65a0a9 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -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, diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index 96381e3b..c4b220f2 100644 --- a/src/engine/SCons/Node/FS.py +++ b/src/engine/SCons/Node/FS.py @@ -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 diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py index 3bba3f4d..f87abe7f 100644 --- a/src/engine/SCons/Node/FSTests.py +++ b/src/engine/SCons/Node/FSTests.py @@ -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) diff --git a/test/option--U.py b/test/option--U.py index d2c518d3..23e82b18 100644 --- a/test/option--U.py +++ b/test/option--U.py @@ -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()