aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-08-02 12:40:04 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-08-02 12:40:04 -0400
commit770d50e49cce4d8ce5e546fe31beaa253505bfa5 (patch)
tree72613bf7c5800b550fdccb883bef4a6bb20b4abe
parent6525265f4640221efb0039ddbd6849a3b04babc9 (diff)
local-store verifying: Rename `store` to something more clear
It is not a `Store` but a `StorePathSet`.
-rw-r--r--src/libstore/local-store.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 17e2ebc38..982a9059c 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -1502,10 +1502,10 @@ bool LocalStore::verifyStore(bool checkContents, RepairFlag repair)
StorePathSet validPaths;
{
- StorePathSet store;
+ StorePathSet storePathsInStoreDir;
for (auto & i : readDirectory(realStoreDir)) {
try {
- store.insert({i.name});
+ storePathsInStoreDir.insert({i.name});
} catch (BadStorePath &) { }
}
@@ -1515,7 +1515,7 @@ bool LocalStore::verifyStore(bool checkContents, RepairFlag repair)
StorePathSet done;
for (auto & i : queryAllValidPaths())
- verifyPath(i, store, done, validPaths, repair, errors);
+ verifyPath(i, storePathsInStoreDir, done, validPaths, repair, errors);
}
/* Optionally, check the content hashes (slow). */
@@ -1602,21 +1602,21 @@ bool LocalStore::verifyStore(bool checkContents, RepairFlag repair)
}
-void LocalStore::verifyPath(const StorePath & path, const StorePathSet & store,
+void LocalStore::verifyPath(const StorePath & path, const StorePathSet & storePathsInStoreDir,
StorePathSet & done, StorePathSet & validPaths, RepairFlag repair, bool & errors)
{
checkInterrupt();
if (!done.insert(path).second) return;
- if (!store.count(path)) {
+ if (!storePathsInStoreDir.count(path)) {
/* Check any referrers first. If we can invalidate them
first, then we can invalidate this path as well. */
bool canInvalidate = true;
StorePathSet referrers; queryReferrers(path, referrers);
for (auto & i : referrers)
if (i != path) {
- verifyPath(i, store, done, validPaths, repair, errors);
+ verifyPath(i, storePathsInStoreDir, done, validPaths, repair, errors);
if (validPaths.count(i))
canInvalidate = false;
}