aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-06-12 10:34:13 +0200
committerzimbatm <zimbatm@zimbatm.com>2019-10-01 07:51:06 +0000
commit168a8879165dd0deab1a93d343a6003146f37031 (patch)
treefa66060b899c51937976e899da0c3cd29186d59d /src/libexpr
parent2d2769f68c7920854ef34ad723c910b6ea2e973d (diff)
Fix fetchTarball with chroot stores
Fixes #2405.
Diffstat (limited to 'src/libexpr')
-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 350dba474..d4c60f870 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}));
}