1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-18 16:29:36 +01:00

Get rid of verifyAllValidPaths boolean blindness

This commit is contained in:
John Ericson 2023-12-11 13:28:40 -05:00
parent c30b5d8a0b
commit b21ee60594
4 changed files with 33 additions and 9 deletions

View file

@ -1443,7 +1443,7 @@ bool LocalStore::verifyStore(bool checkContents, RepairFlag repair)
}
std::pair<bool, StorePathSet> LocalStore::verifyAllValidPaths(RepairFlag repair)
LocalStore::VerificationResult LocalStore::verifyAllValidPaths(RepairFlag repair)
{
StorePathSet storePathsInStoreDir;
/* Why aren't we using `queryAllValidPaths`? Because that would
@ -1476,7 +1476,10 @@ std::pair<bool, StorePathSet> LocalStore::verifyAllValidPaths(RepairFlag repair)
for (auto & i : queryAllValidPaths())
verifyPath(i, existsInStoreDir, done, validPaths, repair, errors);
return { errors, validPaths };
return {
.errors = errors,
.validPaths = validPaths,
};
}