@@ -1246,10 +1246,8 @@ StorePath LocalStore::addToStoreFromDump(
12461246
12471247 auto desc = ContentAddressWithReferences::fromParts (
12481248 hashMethod,
1249- methodsMatch
1250- ? dumpHash
1251- : hashPath (PosixSourceAccessor::createAtRoot (tempPath), hashMethod.getFileIngestionMethod (), hashAlgo)
1252- .first ,
1249+ methodsMatch ? dumpHash
1250+ : hashPath (makeFSSourceAccessor (tempPath), hashMethod.getFileIngestionMethod (), hashAlgo).first ,
12531251 {
12541252 .others = references,
12551253 // caller is not capable of creating a self-reference, because this is content-addressed without modulus
@@ -1385,11 +1383,9 @@ bool LocalStore::verifyStore(bool checkContents, RepairFlag repair)
13851383 checkInterrupt ();
13861384 auto name = link.path ().filename ();
13871385 printMsg (lvlTalkative, " checking contents of %s" , name);
1388- std::string hash = hashPath (
1389- PosixSourceAccessor::createAtRoot (link.path ()),
1390- FileIngestionMethod::NixArchive,
1391- HashAlgorithm::SHA256)
1392- .first .to_string (HashFormat::Nix32, false );
1386+ std::string hash =
1387+ hashPath (makeFSSourceAccessor (link.path ()), FileIngestionMethod::NixArchive, HashAlgorithm::SHA256)
1388+ .first .to_string (HashFormat::Nix32, false );
13931389 if (hash != name.string ()) {
13941390 printError (" link %s was modified! expected hash %s, got '%s'" , link.path (), name, hash);
13951391 if (repair) {
0 commit comments