aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-09-01 21:46:25 +0200
committerEelco Dolstra <edolstra@gmail.com>2021-09-01 21:46:25 +0200
commitf73d9116288a6a16aaead431813d36e924bbd8b5 (patch)
treee123619e3f91dd37a544dbb9daeb43a7865539f2 /src/libstore/local-store.cc
parent2cb7a502a4f2882b46bd1cfa8296d5ee99553a9f (diff)
Style
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index faabe4170..2890df479 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -1071,18 +1071,19 @@ StorePathSet LocalStore::querySubstitutablePaths(const StorePathSet & paths)
}
+// FIXME: move this, it's not specific to LocalStore.
void LocalStore::querySubstitutablePathInfos(const StorePathCAMap & paths, SubstitutablePathInfos & infos)
{
if (!settings.useSubstitutes) return;
for (auto & sub : getDefaultSubstituters()) {
for (auto & path : paths) {
- if (infos.find(path.first) != infos.end())
- // choose first succeeding substituter
+ if (infos.count(path.first))
+ // Choose first succeeding substituter.
continue;
auto subPath(path.first);
- // recompute store path so that we can use a different store root
+ // Recompute store path so that we can use a different store root.
if (path.second) {
subPath = makeFixedOutputPathFromCA(path.first.name(), *path.second);
if (sub->storeDir == storeDir)