Fix condition error and make test suite pass

This commit is contained in:
Carlo Nucera 2020-06-04 17:21:21 -04:00
parent 94ddea9e2f
commit d614166cb6

View file

@ -1265,7 +1265,7 @@ bool LocalStore::verifyStore(bool checkContents, RepairFlag repair)
printMsg(Verbosity::Talkative, "checking contents of '%s'", printStorePath(i));
std::unique_ptr<AbstractHashSink> hashSink;
if (info->ca || !info->references.count(info->path))
if (!info->ca || !info->references.count(info->path))
hashSink = std::make_unique<HashSink>(*info->narHash.type);
else
hashSink = std::make_unique<HashModuloSink>(*info->narHash.type, storePathToHash(printStorePath(info->path)));