aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
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 dec917b38..1c6fd5b33 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);
}