aboutsummaryrefslogtreecommitdiff
path: root/src/nix-channel
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-02-25 23:20:50 +0800
committerEelco Dolstra <edolstra@gmail.com>2019-06-24 21:58:33 +0200
commitdc29e9fb47f9f98a851dc88b2bd3cae4b5c1fe6b (patch)
tree987610c21a2bf0796dc9e2d6b92daca215fd9d6c /src/nix-channel
parent94f11d0a61bba15ff8a93f2de8d1883783c8c508 (diff)
downloadCached: Return ETag
(cherry picked from commit 529add316c5356a8060c35f987643b7bf5c796dc)
Diffstat (limited to 'src/nix-channel')
-rwxr-xr-xsrc/nix-channel/nix-channel.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix-channel/nix-channel.cc b/src/nix-channel/nix-channel.cc
index 8b66cc7e3..7b23088a2 100755
--- a/src/nix-channel/nix-channel.cc
+++ b/src/nix-channel/nix-channel.cc
@@ -88,7 +88,7 @@ static void update(const StringSet & channelNames)
// definition from a consistent location if the redirect changes mid-download.
std::string effectiveUrl;
auto dl = getDownloader();
- auto filename = dl->downloadCached(store, url, false, "", Hash(), &effectiveUrl, 0);
+ auto filename = dl->downloadCached(store, url, false, "", Hash(), &effectiveUrl, 0).path;
url = chomp(std::move(effectiveUrl));
// If the URL contains a version number, append it to the name
@@ -123,10 +123,10 @@ static void update(const StringSet & channelNames)
// Download the channel tarball.
auto fullURL = url + "/nixexprs.tar.xz";
try {
- filename = dl->downloadCached(store, fullURL, false);
+ filename = dl->downloadCached(store, fullURL, false).path;
} catch (DownloadError & e) {
fullURL = url + "/nixexprs.tar.bz2";
- filename = dl->downloadCached(store, fullURL, false);
+ filename = dl->downloadCached(store, fullURL, false).path;
}
chomp(filename);
}