From d3eb02b9cb29dcda33bcd2a25fc005d24079aa00 Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Mon, 14 Mar 2022 11:29:28 +0100 Subject: LocalApi: Fix missing entries in cached trees from tree map ... as wrongfully only sub-tree entries were added to locally cached trees, although they should also store entries for files and executables. --- src/buildtool/execution_api/local/local_storage.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/buildtool/execution_api/local/local_storage.cpp') diff --git a/src/buildtool/execution_api/local/local_storage.cpp b/src/buildtool/execution_api/local/local_storage.cpp index b4fe1658..c007fc1d 100644 --- a/src/buildtool/execution_api/local/local_storage.cpp +++ b/src/buildtool/execution_api/local/local_storage.cpp @@ -104,13 +104,11 @@ auto LocalStorage::ReadObjectInfosRecursively( return BazelMsgFactory::ReadObjectInfosFromDirectory( *dir, [this, &store_info, &parent, &tree](auto path, auto info) { - return IsTreeObject(info.type) - ? (not tree or tree->AddInfo(path, info)) and - ReadObjectInfosRecursively( - store_info, - parent / path, - info.digest) - : store_info(parent / path, info); + return (not tree or tree->AddInfo(path, info)) and + (IsTreeObject(info.type) + ? ReadObjectInfosRecursively( + store_info, parent / path, info.digest) + : store_info(parent / path, info)); }) and (not tree_map_ or tree_map_->AddTree(digest, std::move(*tree))); } -- cgit v1.2.3