Fix fetchTarball with chroot stores

Fixes #2405.

(cherry picked from commit 168a8879165dd0deab1a93d343a6003146f37031)
This commit is contained in:
Eelco Dolstra 2019-06-12 10:34:13 +02:00
parent b0ae8fe2db
commit 3919093e9a
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -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}));
}