summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/execution_api')
-rw-r--r--src/buildtool/execution_api/bazel_msg/bazel_msg_factory.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/buildtool/execution_api/bazel_msg/bazel_msg_factory.cpp b/src/buildtool/execution_api/bazel_msg/bazel_msg_factory.cpp
index 6a8ebb87..2f3dbc01 100644
--- a/src/buildtool/execution_api/bazel_msg/bazel_msg_factory.cpp
+++ b/src/buildtool/execution_api/bazel_msg/bazel_msg_factory.cpp
@@ -509,9 +509,7 @@ auto BazelMsgFactory::CreateDirectoryDigestFromLocalTree(
// create and store file
try {
const auto full_name = root / name;
- const bool is_executable =
- FileSystemManager::IsExecutable(full_name, true);
- if (auto digest = store_file(full_name, is_executable)) {
+ if (auto digest = store_file(full_name, IsExecutableObject(type))) {
auto file = CreateFileNode(name.string(), type, {});
file.set_allocated_digest(gsl::owner<bazel_re::Digest*>{
new bazel_re::Digest{std::move(*digest)}});
@@ -568,15 +566,11 @@ auto BazelMsgFactory::CreateGitTreeDigestFromLocalTree(
// create and store file
try {
const auto full_name = root / name;
- const bool is_executable =
- FileSystemManager::IsExecutable(full_name, true);
- if (auto digest = store_file(full_name, is_executable)) {
+ if (auto digest = store_file(full_name, IsExecutableObject(type))) {
if (auto raw_id = FromHexString(
NativeSupport::Unprefix(digest->hash()))) {
- entries[std::move(*raw_id)].emplace_back(
- name.string(),
- is_executable ? ObjectType::Executable
- : ObjectType::File);
+ entries[std::move(*raw_id)].emplace_back(name.string(),
+ type);
return true;
}
}