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)
commit90220e168acc2648c63cc32642f46fccd4858002 (patch)
tree408f5ba2b360bd76a2ef9d2980165e01c7d11b97 /src
parent72b9a2eca2ed2f2c94e10758b03016703878d333 (diff)
downloadSCons-90220e168acc2648c63cc32642f46fccd4858002.zip
SCons-90220e168acc2648c63cc32642f46fccd4858002.tar.gz
SCons-90220e168acc2648c63cc32642f46fccd4858002.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__"