aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/search.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-07-17 17:17:55 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-07-17 17:17:55 +0200
commit4ca5a5bc2991438602d3b1fdb56b91d2b425c52d (patch)
treeb9a2f6f801031af9299bfc45095eac1eb3ceb495 /libbuild2/search.cxx
parentab4a9ef42e8f1070dcb5d783a5afccd2f685e86d (diff)
Fix race in path/mtime assignment and file_rule::match()
Diffstat (limited to 'libbuild2/search.cxx')
-rw-r--r--libbuild2/search.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/libbuild2/search.cxx b/libbuild2/search.cxx
index 5887138..8f5410c 100644
--- a/libbuild2/search.cxx
+++ b/libbuild2/search.cxx
@@ -194,8 +194,7 @@ namespace build2
l5 ([&]{trace << (r.second ? "new" : "existing") << " target " << t
<< " for prerequisite " << cpk;});
- t.mtime (mt);
- t.path (move (f));
+ t.path_mtime (move (f), mt);
return &t;
}