about summary refs log tree commit diff
path: root/src/libstore/binary-cache-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2016-10-07T16·13+0200
committerEelco Dolstra <edolstra@gmail.com>2016-10-07T16·13+0200
commit629ab8002218e9b526d947a9b7a2eccddc3f331c (patch)
tree1c7afac50fcad1019c9b45b97e421d6a3d121823 /src/libstore/binary-cache-store.cc
parentb0f7f9c98f2b54e34e9344f817d30363533d108f (diff)
importPaths(): Fix accessor support for Hydra
Diffstat (limited to 'src/libstore/binary-cache-store.cc')
-rw-r--r--src/libstore/binary-cache-store.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstore/binary-cache-store.cc b/src/libstore/binary-cache-store.cc
index 0ffbd6e552b7..01d1a7e246d9 100644
--- a/src/libstore/binary-cache-store.cc
+++ b/src/libstore/binary-cache-store.cc
@@ -318,4 +318,12 @@ ref<FSAccessor> BinaryCacheStore::getFSAccessor()
             std::dynamic_pointer_cast<BinaryCacheStore>(shared_from_this())));
 }
 
+void BinaryCacheStore::addPathToAccessor(ref<FSAccessor> accessor,
+    const Path & storePath, const ref<std::string> & data)
+{
+    auto accessor_ = accessor.dynamic_pointer_cast<BinaryCacheStoreAccessor>();
+    if (accessor_)
+        accessor_->nars.emplace(storePath, makeNarAccessor(data));
+}
+
 }