1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 12:41:15 +02:00

toStorePath(): Return a StorePath and the suffix

This commit is contained in:
Eelco Dolstra 2020-07-13 16:19:37 +02:00
parent 143a5f32ed
commit c0dd05131e
11 changed files with 60 additions and 61 deletions

View file

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