about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/remote-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libstore/remote-store.cc')
-rw-r--r--third_party/nix/src/libstore/remote-store.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/third_party/nix/src/libstore/remote-store.cc b/third_party/nix/src/libstore/remote-store.cc
index b2e660dc2af9..8d278d500dd5 100644
--- a/third_party/nix/src/libstore/remote-store.cc
+++ b/third_party/nix/src/libstore/remote-store.cc
@@ -359,7 +359,8 @@ void RemoteStore::queryPathInfoUncached(
       if (!info->deriver.empty()) {
         assertStorePath(info->deriver);
       }
-      info->narHash = Hash(readString(conn->from), htSHA256);
+      auto hash_ = Hash::deserialize(readString(conn->from), htSHA256);
+      info->narHash = Hash::unwrap_throw(hash_);
       info->references = readStorePaths<PathSet>(*this, conn->from);
       conn->from >> info->registrationTime >> info->narSize;
       if (GET_PROTOCOL_MINOR(conn->daemonVersion) >= 16) {