diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-06-14 16:40:48 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-06-26 17:57:29 +0200 |
commit | 3865c8556bde5e614dc1e8c72f83fa1ed65abcd9 (patch) | |
tree | 7c4f118c07fe35a89deadbc9f4aa09b2f5f64e87 /src/buildtool/execution_api/remote/bazel/bazel_api.cpp | |
parent | db961e1e9fba6e0c439f69ac8342ef887d9d19a6 (diff) | |
download | justbuild-3865c8556bde5e614dc1e8c72f83fa1ed65abcd9.tar.gz |
bazel_msg_factory: Allow non-upwards symlinks in uploaded trees
Diffstat (limited to 'src/buildtool/execution_api/remote/bazel/bazel_api.cpp')
-rw-r--r-- | src/buildtool/execution_api/remote/bazel/bazel_api.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp index fcfb517d..f4fd3b1f 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp @@ -312,8 +312,21 @@ auto BazelApi::CreateAction( if (Compatibility::IsCompatible()) { BlobContainer blobs{}; + auto const& network = network_; auto digest = BazelMsgFactory::CreateDirectoryDigestFromTree( *build_root, + [&network](std::vector<bazel_re::Digest> const& digests, + std::vector<std::string>* targets) { + auto reader = network->ReadBlobs(digests); + auto blobs = reader.Next(); + targets->reserve(digests.size()); + while (not blobs.empty()) { + for (auto const& blob : blobs) { + targets->emplace_back(blob.data); + } + blobs = reader.Next(); + } + }, [&blobs](BazelBlob&& blob) { blobs.Emplace(std::move(blob)); }); if (not digest) { Logger::Log(LogLevel::Debug, |