aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/s3-binary-cache-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-04-29 17:34:31 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-04-29 17:34:31 +0200
commit6963de209135d191bdb67cf126df4dda9b19d44e (patch)
tree1242ff282e81da3c24916e032f56b8c04f3e3ca9 /src/libstore/s3-binary-cache-store.cc
parent0dd988d2e3653d81b7bda43e0618ce330553b7bc (diff)
nix verify --all: Support local binary caches
Diffstat (limited to 'src/libstore/s3-binary-cache-store.cc')
-rw-r--r--src/libstore/s3-binary-cache-store.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/s3-binary-cache-store.cc b/src/libstore/s3-binary-cache-store.cc
index 58ee0b638..cffcb1bf2 100644
--- a/src/libstore/s3-binary-cache-store.cc
+++ b/src/libstore/s3-binary-cache-store.cc
@@ -227,8 +227,8 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore
for (auto object : contents) {
auto & key = object.GetKey();
- if (!hasSuffix(key, ".narinfo")) continue;
- paths.insert(settings.nixStore + "/" + std::string(key, 0, key.size() - 8));
+ if (key.size() != 40 || !hasSuffix(key, ".narinfo")) continue;
+ paths.insert(settings.nixStore + "/" + key.substr(0, key.size() - 8));
}
marker = res.GetNextMarker();