about summary refs log tree commit diff
path: root/src/libexpr
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-02-25T15·20+0800
committerEelco Dolstra <edolstra@gmail.com>2019-06-24T19·58+0200
commitdc29e9fb47f9f98a851dc88b2bd3cae4b5c1fe6b (patch)
tree987610c21a2bf0796dc9e2d6b92daca215fd9d6c /src/libexpr
parent94f11d0a61bba15ff8a93f2de8d1883783c8c508 (diff)
downloadCached: Return ETag
(cherry picked from commit 529add316c5356a8060c35f987643b7bf5c796dc)
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/common-eval-args.cc2
-rw-r--r--src/libexpr/parser.y2
-rw-r--r--src/libexpr/primops.cc2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/common-eval-args.cc b/src/libexpr/common-eval-args.cc
index 3e0c78f280f7..37c74a94b29f 100644
--- a/src/libexpr/common-eval-args.cc
+++ b/src/libexpr/common-eval-args.cc
@@ -46,7 +46,7 @@ Bindings * MixEvalArgs::getAutoArgs(EvalState & state)
 Path lookupFileArg(EvalState & state, string s)
 {
     if (isUri(s))
-        return getDownloader()->downloadCached(state.store, s, true);
+        return getDownloader()->downloadCached(state.store, s, true).path;
     else if (s.size() > 2 && s.at(0) == '<' && s.at(s.size() - 1) == '>') {
         Path p = s.substr(1, s.size() - 2);
         return state.findFile(p);
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y
index 78a503907185..29860fb05766 100644
--- a/src/libexpr/parser.y
+++ b/src/libexpr/parser.y
@@ -677,7 +677,7 @@ std::pair<bool, std::string> EvalState::resolveSearchPathElem(const SearchPathEl
 
     if (isUri(elem.second)) {
         try {
-            res = { true, getDownloader()->downloadCached(store, elem.second, true) };
+            res = { true, getDownloader()->downloadCached(store, elem.second, true).path };
         } catch (DownloadError & e) {
             printError(format("warning: Nix search path entry '%1%' cannot be downloaded, ignoring") % elem.second);
             res = { false, "" };
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 06f577f36fce..55a1bde117c4 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -2083,7 +2083,7 @@ void fetch(EvalState & state, const Pos & pos, Value * * args, Value & v,
     if (evalSettings.pureEval && !expectedHash)
         throw Error("in pure evaluation mode, '%s' requires a 'sha256' argument", who);
 
-    Path res = getDownloader()->downloadCached(state.store, url, unpack, name, expectedHash);
+    Path res = getDownloader()->downloadCached(state.store, url, unpack, name, expectedHash).path;
 
     if (state.allowedPaths)
         state.allowedPaths->insert(res);