aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/local-binary-cache-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/local-binary-cache-store.cc')
-rw-r--r--src/libstore/local-binary-cache-store.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/local-binary-cache-store.cc b/src/libstore/local-binary-cache-store.cc
index 5ba5bd802..99dd0e0f6 100644
--- a/src/libstore/local-binary-cache-store.cc
+++ b/src/libstore/local-binary-cache-store.cc
@@ -68,10 +68,10 @@ protected:
del.cancel();
}
- void getFile(const std::string & path, Sink & sink) override
+ box_ptr<Source> getFile(const std::string & path) override
{
try {
- sink << readFileSource(binaryCacheDir + "/" + path);
+ return make_box_ptr<GeneratorSource>(readFileSource(binaryCacheDir + "/" + path));
} catch (SysError & e) {
if (e.errNo == ENOENT)
throw NoSuchBinaryCacheFile("file '%s' does not exist in binary cache", path);