diff options
Diffstat (limited to 'src/buildtool/execution_api/bazel_msg/bazel_blob.hpp')
-rw-r--r-- | src/buildtool/execution_api/bazel_msg/bazel_blob.hpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/buildtool/execution_api/bazel_msg/bazel_blob.hpp b/src/buildtool/execution_api/bazel_msg/bazel_blob.hpp index 15845c08..ed82d92d 100644 --- a/src/buildtool/execution_api/bazel_msg/bazel_blob.hpp +++ b/src/buildtool/execution_api/bazel_msg/bazel_blob.hpp @@ -35,14 +35,15 @@ struct BazelBlob { bool is_exec{}; // optional: hint to put the blob in executable CAS }; -[[nodiscard]] static inline auto CreateBlobFromFile( - std::filesystem::path const& file_path) noexcept - -> std::optional<BazelBlob> { - auto const type = FileSystemManager::Type(file_path); +/// \brief Create a blob from the content found in file or symlink pointed to by +/// given path. +[[nodiscard]] static inline auto CreateBlobFromPath( + std::filesystem::path const& fpath) noexcept -> std::optional<BazelBlob> { + auto const type = FileSystemManager::Type(fpath); if (not type) { return std::nullopt; } - auto const content = FileSystemManager::ReadFile(file_path, *type); + auto const content = FileSystemManager::ReadContentAtPath(fpath, *type); if (not content.has_value()) { return std::nullopt; } |