mirror of
https://github.com/NixOS/nix.git
synced 2025-11-18 00:12:43 +01:00
libutil: Make HashResult a proper struct
This resolves an existing TODO and makes the code slightly more readable.
This commit is contained in:
parent
241420a788
commit
143bd60136
18 changed files with 56 additions and 50 deletions
|
|
@ -33,7 +33,7 @@ void Store::exportPath(const StorePath & path, Sink & sink)
|
|||
/* Refuse to export paths that have changed. This prevents
|
||||
filesystem corruption from spreading to other machines.
|
||||
Don't complain if the stored hash is zero (unknown). */
|
||||
Hash hash = hashSink.currentHash().first;
|
||||
Hash hash = hashSink.currentHash().hash;
|
||||
if (hash != info->narHash && info->narHash != Hash(info->narHash.algo))
|
||||
throw Error(
|
||||
"hash of path '%s' has changed from '%s' to '%s'!",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue