From 50bcabb0717dae7c8411db59115c41b7cc636cb3 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Wed, 28 Aug 2024 14:43:23 +0200 Subject: Replace ArtifactDigest::CreateFromFile ...with ArtifactDigestFactory::HashFileAs --- src/buildtool/file_system/object_cas.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/buildtool/file_system/object_cas.hpp') diff --git a/src/buildtool/file_system/object_cas.hpp b/src/buildtool/file_system/object_cas.hpp index d8ea71a2..79ba70da 100644 --- a/src/buildtool/file_system/object_cas.hpp +++ b/src/buildtool/file_system/object_cas.hpp @@ -23,6 +23,7 @@ #include "gsl/gsl" #include "src/buildtool/common/artifact_digest.hpp" +#include "src/buildtool/common/artifact_digest_factory.hpp" #include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/file_system/file_storage.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" @@ -129,7 +130,8 @@ class ObjectCAS { [[nodiscard]] auto CreateDigest(std::filesystem::path const& file_path) const noexcept -> std::optional { - return ArtifactDigest::CreateFromFile(hash_function_, file_path); + return ArtifactDigestFactory::HashFileAs(hash_function_, + file_path); } [[nodiscard]] auto IsAvailable( -- cgit v1.2.3