openStoreAt(): Initialise the binary cache

This commit is contained in:
Eelco Dolstra 2016-02-24 16:52:07 +01:00
parent ba0a81d14f
commit 30e9d01516

View file

@ -323,9 +323,11 @@ namespace nix {
ref<Store> openStoreAt(const std::string & uri, bool reserveSpace) ref<Store> openStoreAt(const std::string & uri, bool reserveSpace)
{ {
if (std::string(uri, 0, 7) == "file://") { if (std::string(uri, 0, 7) == "file://") {
return make_ref<LocalBinaryCacheStore>(std::shared_ptr<Store>(0), auto store = make_ref<LocalBinaryCacheStore>(std::shared_ptr<Store>(0),
"", "", // FIXME: allow the signing key to be set "", "", // FIXME: allow the signing key to be set
std::string(uri, 7)); std::string(uri, 7));
store->init();
return store;
} }
enum { mDaemon, mLocal, mAuto } mode; enum { mDaemon, mLocal, mAuto } mode;