From: Clemens Wasser Date: Wed, 20 Mar 2024 12:40:31 +0000 (+0100) Subject: Read file in do_hash_file as Bytes X-Git-Tag: v4.10~71^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0929cdcdafff325de06541d07b5b819f3ea8eb1f;p=thirdparty%2Fccache.git Read file in do_hash_file as Bytes --- 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;