mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
Merge pull request #14249 from NixOS/more-to-real-path-cleanups
More toRealPath cleanups
This commit is contained in:
commit
6dcc468253
13 changed files with 47 additions and 38 deletions
|
|
@ -588,7 +588,11 @@ static void fetch(
|
|||
|
||||
if (expectedHash) {
|
||||
auto hash = unpack ? state.store->queryPathInfo(storePath)->narHash
|
||||
: hashFile(HashAlgorithm::SHA256, state.store->toRealPath(storePath));
|
||||
: hashPath(
|
||||
{state.store->requireStoreObjectAccessor(storePath)},
|
||||
FileSerialisationMethod::Flat,
|
||||
HashAlgorithm::SHA256)
|
||||
.hash;
|
||||
if (hash != *expectedHash) {
|
||||
state
|
||||
.error<EvalError>(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue