aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
authorCarlo Nucera <carlo.nucera@protonmail.com>2020-07-15 17:19:56 -0400
committerCarlo Nucera <carlo.nucera@protonmail.com>2020-07-15 17:21:01 -0400
commitd0905623488ca97feeb28ebd9817af6270a53c48 (patch)
treebe3504d2c37bc65df0f80dc358bbec49c217e7bf /src/libexpr/primops.cc
parent44157653850ce18536f837d7ed53521d61a238a1 (diff)
parent36a124260361ba8dfa43bf43a067dcc48064c93f (diff)
Merge branch 'master' of github.com:NixOS/nix into hash-always-has-type
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 138e00f48..9aa776ba5 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -883,10 +883,10 @@ static void prim_storePath(EvalState & state, const Pos & pos, Value * * args, V
.hint = hintfmt("path '%1%' is not in the Nix store", path),
.errPos = pos
});
- Path path2 = state.store->toStorePath(path);
+ auto path2 = state.store->toStorePath(path).first;
if (!settings.readOnlyMode)
- state.store->ensurePath(state.store->parseStorePath(path2));
- context.insert(path2);
+ state.store->ensurePath(path2);
+ context.insert(state.store->printStorePath(path2));
mkString(v, path, context);
}