From 0929cdcdafff325de06541d07b5b819f3ea8eb1f Mon Sep 17 00:00:00 2001 From: Clemens Wasser Date: Wed, 20 Mar 2024 13:40:31 +0100 Subject: [PATCH] Read file in do_hash_file as Bytes --- src/ccache/hashutil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ccache/hashutil.cpp b/src/ccache/hashutil.cpp index e783921c..efe978cb 100644 --- a/src/ccache/hashutil.cpp +++ b/src/ccache/hashutil.cpp @@ -194,7 +194,7 @@ do_hash_file(const Context& ctx, (void)ctx; #endif - const auto data = util::read_file(path, size_hint); + const auto data = util::read_file(path, size_hint); if (!data) { LOG("Failed to read {}: {}", path, data.error()); return HashSourceCodeResult(HashSourceCode::error); @@ -202,7 +202,7 @@ do_hash_file(const Context& ctx, HashSourceCodeResult result; if (check_temporal_macros) { - result.insert(check_for_temporal_macros(*data)); + result.insert(check_for_temporal_macros(util::to_string_view(*data))); } Hash hash; -- 2.47.2