From 30370f168fef6fd1dd2e888a680e3cabbb7215c1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 31 Jan 2018 15:12:27 +0100 Subject: Cleanup --- src/libstore/http-binary-cache-store.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/libstore/http-binary-cache-store.cc') diff --git a/src/libstore/http-binary-cache-store.cc b/src/libstore/http-binary-cache-store.cc index 93bd3e5d5982..b9e9cd5daba5 100644 --- a/src/libstore/http-binary-cache-store.cc +++ b/src/libstore/http-binary-cache-store.cc @@ -38,7 +38,7 @@ public: try { BinaryCacheStore::init(); } catch (UploadToHTTP &) { - throw Error(format("'%s' does not appear to be a binary cache") % cacheUri); + throw Error("'%s' does not appear to be a binary cache", cacheUri); } diskCache->createCache(cacheUri, storeDir, wantMassQuery_, priority); } @@ -67,8 +67,9 @@ protected: const std::string & data, const std::string & mimeType) override { - auto data_ = std::make_shared(data); - auto req = DownloadRequest(cacheUri + "/" + path, data_, mimeType); + auto req = DownloadRequest(cacheUri + "/" + path); + req.data = std::make_shared(data); // FIXME: inefficient + req.mimeType = mimeType; try { getDownloader()->download(req); } catch (DownloadError & e) { -- cgit 1.4.1