aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/http-binary-cache-store.cc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-05-09 21:22:48 +0200
committereldritch horrors <pennae@lix.systems>2024-06-19 10:50:12 +0000
commitc55dcc6c13b864dc613a0a6ba51e0b897868f4b4 (patch)
tree2c588cf6dd0662b9b8875e9dd7802b564e9306c5 /src/libstore/http-binary-cache-store.cc
parent11f4a5bc7eca8a4cca2ae9f3d83b69cd497933f8 (diff)
filetransfer: return a Source from download()
without this we will not be able to get rid of makeDecompressionSink, which in turn will be necessary to get rid of sourceToSink (since the libarchive archive wrapper *must* be a Source due to api limitations) Change-Id: Iccd3d333ba2cbcab49cb5a1d3125624de16bce27
Diffstat (limited to 'src/libstore/http-binary-cache-store.cc')
-rw-r--r--src/libstore/http-binary-cache-store.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/http-binary-cache-store.cc b/src/libstore/http-binary-cache-store.cc
index f64da2569..06297e2eb 100644
--- a/src/libstore/http-binary-cache-store.cc
+++ b/src/libstore/http-binary-cache-store.cc
@@ -155,7 +155,7 @@ protected:
checkEnabled();
auto request(makeRequest(path));
try {
- getFileTransfer()->download(std::move(request), sink);
+ getFileTransfer()->download(std::move(request))->drainInto(sink);
} catch (FileTransferError & e) {
if (e.error == FileTransfer::NotFound || e.error == FileTransfer::Forbidden)
throw NoSuchBinaryCacheFile("file '%s' does not exist in binary cache '%s'", path, getUri());