From 6963de209135d191bdb67cf126df4dda9b19d44e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 29 Apr 2016 17:34:31 +0200 Subject: nix verify --all: Support local binary caches --- src/libstore/s3-binary-cache-store.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstore/s3-binary-cache-store.cc') diff --git a/src/libstore/s3-binary-cache-store.cc b/src/libstore/s3-binary-cache-store.cc index 58ee0b6384b1..cffcb1bf214f 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(); -- cgit 1.4.1