about summary refs log tree commit diff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-06-12T08·34+0200
committerEelco Dolstra <edolstra@gmail.com>2019-10-09T14·23+0200
commit3919093e9ade4d3046347a37dbdbc72d22f4f214 (patch)
treee3b346c8613e24714d2b887497261792fd09ff39 /src/libexpr/primops.cc
parentb0ae8fe2db5aa7955459ec13728ab26150547f3c (diff)
Fix fetchTarball with chroot stores
Fixes #2405.

(cherry picked from commit 168a8879165dd0deab1a93d343a6003146f37031)
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r--src/libexpr/primops.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 350dba47409e..d4c60f870ed2 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -2089,12 +2089,12 @@ void fetch(EvalState & state, const Pos & pos, Value * * args, Value & v,
     if (evalSettings.pureEval && !request.expectedHash)
         throw Error("in pure evaluation mode, '%s' requires a 'sha256' argument", who);
 
-    Path res = getDownloader()->downloadCached(state.store, request).path;
+    auto res = getDownloader()->downloadCached(state.store, request);
 
     if (state.allowedPaths)
-        state.allowedPaths->insert(res);
+        state.allowedPaths->insert(res.path);
 
-    mkString(v, res, PathSet({res}));
+    mkString(v, res.storePath, PathSet({res.storePath}));
 }