1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

Properly filter the stores according to their declared uriSchemes

When opening a store, only try the stores whose `uriSchemes()` include
the current one
This commit is contained in:
regnat 2020-09-11 11:11:05 +02:00
parent 5895184df4
commit 7f103dcddd
10 changed files with 51 additions and 33 deletions

View file

@ -197,6 +197,7 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore, virtual S3BinaryCache
S3Helper s3Helper;
S3BinaryCacheStoreImpl(
[[maybe_unused]] const std::string & scheme,
const std::string & bucketName,
const Params & params)
: StoreConfig(params)
@ -434,7 +435,7 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore, virtual S3BinaryCache
return paths;
}
static std::vector<std::string> uriPrefixes() { return {"s3"}; }
static std::set<std::string> uriSchemes() { return {"s3"}; }
};