From 9bd1a1619e282c585b3f202d84790f8811d1e4d6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 10 Apr 2019 14:16:21 +0200 Subject: Always use cached mtime if available Besides other things, this is required for "logical clean" in the try-run mode to work properly: $ b -vn clean update --- build2/rule.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'build2/rule.cxx') diff --git a/build2/rule.cxx b/build2/rule.cxx index 79b91b3..a09e28b 100644 --- a/build2/rule.cxx +++ b/build2/rule.cxx @@ -55,8 +55,8 @@ namespace build2 timestamp ts (mt.mtime ()); - if (ts != timestamp_unknown && ts != timestamp_nonexistent) - return true; + if (ts != timestamp_unknown) + return ts != timestamp_nonexistent; // Otherwise, if this is not a path_target, then we don't match. // @@ -86,7 +86,7 @@ namespace build2 ts = mtime (*p); pt->mtime (ts); - if (ts != timestamp_unknown && ts != timestamp_nonexistent) + if (ts != timestamp_nonexistent) return true; l4 ([&]{trace << "no existing file for target " << *pt;}); -- cgit v1.1