summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2006-01-21 15:22:29 (GMT)
committerSteven Knight <knight@baldmt.com>2006-01-21 15:22:29 (GMT)
commit222e96534b47d6a14167b2938212d1933d27eec9 (patch)
tree408f5ba2b360bd76a2ef9d2980165e01c7d11b97 /src
parentfcbe6204ad17af3c5b5fd138de734a45399cb839 (diff)
downloadSCons-222e96534b47d6a14167b2938212d1933d27eec9.zip
SCons-222e96534b47d6a14167b2938212d1933d27eec9.tar.gz
SCons-222e96534b47d6a14167b2938212d1933d27eec9.tar.bz2
More efficient Node.FS.Dir.current() check. Fix some Windows test portability issues.
Diffstat (limited to 'src')
-rw-r--r--src/engine/SCons/Node/FS.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py
index d9282ea..a0a7a44 100644
--- a/src/engine/SCons/Node/FS.py
+++ b/src/engine/SCons/Node/FS.py
@@ -1377,20 +1377,15 @@ class Dir(Base):
pass
def current(self, calc=None):
- """If all of our children were up-to-date, then this
- directory was up-to-date, too."""
+ """If any child is not up-to-date, then this directory isn't,
+ either."""
if not self.builder is MkdirBuilder and not self.exists():
return 0
- state = 0
+ up_to_date = SCons.Node.up_to_date
for kid in self.children():
- s = kid.get_state()
- if s and (not state or s > state):
- state = s
- import SCons.Node
- if state == 0 or state == SCons.Node.up_to_date:
- return 1
- else:
- return 0
+ if kid.get_state() > up_to_date:
+ return 0
+ return 1
def rdir(self):
"__cacheable__"