1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-13 22:12:43 +01:00

Fix recursive ingestion from lower store

This commit is contained in:
John Ericson 2023-05-09 16:42:28 -04:00
parent e7c3399ed2
commit 5059be53b1
2 changed files with 17 additions and 5 deletions

View file

@ -92,7 +92,12 @@ bool LocalOverlayStore::isValidPathUncached(const StorePath & path)
res = lowerStore->isValidPath(path);
if (res) {
// Get path info from lower store so upper DB genuinely has it.
LocalStore::registerValidPath(*lowerStore->queryPathInfo(path));
auto p = lowerStore->queryPathInfo(path);
// recur on references, syncing entire closure.
for (auto & r : p->references)
if (r != path)
isValidPath(r);
LocalStore::registerValidPath(*p);
}
return res;
}