1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 02:11:15 +02:00

Rename makeFSSourceAccessor -> getFSSourceAccessor()

This makes it clearer that it returns a shared accessor object.
This commit is contained in:
Eelco Dolstra 2024-05-06 19:16:52 +02:00
parent eab2919119
commit ef28c7329c
7 changed files with 17 additions and 14 deletions

View file

@ -1252,7 +1252,7 @@ StorePath LocalStore::addToStoreFromDump(
methodsMatch
? dumpHash
: hashPath(
{makeFSSourceAccessor(), CanonPath(tempPath)},
{getFSSourceAccessor(), CanonPath(tempPath)},
hashMethod.getFileIngestionMethod(), hashAlgo),
{
.others = references,
@ -1392,7 +1392,7 @@ bool LocalStore::verifyStore(bool checkContents, RepairFlag repair)
Path linkPath = linksDir + "/" + link.name;
PosixSourceAccessor accessor;
std::string hash = hashPath(
{makeFSSourceAccessor(), CanonPath(linkPath)},
{getFSSourceAccessor(), CanonPath(linkPath)},
FileIngestionMethod::Recursive, HashAlgorithm::SHA256).to_string(HashFormat::Nix32, false);
if (hash != link.name) {
printError("link '%s' was modified! expected hash '%s', got '%s'",