diff options
Diffstat (limited to 'src/other_tools/root_maps')
-rw-r--r-- | src/other_tools/root_maps/distdir_git_map.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/other_tools/root_maps/distdir_git_map.cpp b/src/other_tools/root_maps/distdir_git_map.cpp index 54abaae2..9171daae 100644 --- a/src/other_tools/root_maps/distdir_git_map.cpp +++ b/src/other_tools/root_maps/distdir_git_map.cpp @@ -42,19 +42,21 @@ namespace { content_list, std::filesystem::path const& tmp_dir) noexcept -> bool { auto const& cas = storage.CAS(); - return std::all_of(content_list->begin(), - content_list->end(), - [&cas, tmp_dir](auto const& kv) { - auto content_path = - cas.BlobPath(ArtifactDigest(kv.second, 0, false), - /*is_executable=*/false); - if (content_path) { - return FileSystemManager::CreateFileHardlink( - *content_path, // from: cas_path/content_id - tmp_dir / kv.first); // to: tmp_dir/name - } - return false; - }); + return std::all_of( + content_list->begin(), + content_list->end(), + [&cas, tmp_dir](auto const& kv) { + auto content_path = + cas.BlobPath(ArtifactDigest(kv.second, 0, false), + /*is_executable=*/false); + if (content_path) { + return FileSystemManager::CreateFileHardlink( + *content_path, // from: cas_path/content_id + tmp_dir / kv.first) // to: tmp_dir/name + .has_value(); + } + return false; + }); } /// \brief Called once we know we have the content blobs in local CAS in order |