From 0b3c77edde2b3497e3d943d1433d704453eabd19 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Wed, 11 Sep 2024 15:19:34 +0200 Subject: Check compatibility in readers based on the hash type --- src/buildtool/execution_api/common/tree_reader.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/buildtool/execution_api/common/tree_reader.hpp') diff --git a/src/buildtool/execution_api/common/tree_reader.hpp b/src/buildtool/execution_api/common/tree_reader.hpp index 18e94fe8..de1e2edf 100644 --- a/src/buildtool/execution_api/common/tree_reader.hpp +++ b/src/buildtool/execution_api/common/tree_reader.hpp @@ -59,7 +59,7 @@ class TreeReader final { return true; }; - if (ProtocolTraits::Instance().IsCompatible()) { + if (not impl_.IsNativeProtocol()) { auto tree = impl_.ReadDirectory(digest); if (tree and not TreeReaderUtils::ReadObjectInfos(*tree, store_info)) { @@ -132,7 +132,7 @@ class TreeReader final { : store(parent / path, info); }; - if (ProtocolTraits::Instance().IsCompatible()) { + if (not impl_.IsNativeProtocol()) { if (auto tree = impl_.ReadDirectory(digest)) { if (include_trees and IsDirectoryEmpty(*tree)) { if (not store(parent, {digest, ObjectType::Tree})) { -- cgit v1.2.3