mirror of
https://github.com/NixOS/nix
synced 2025-06-29 14:53:16 +02:00
Fix dirOf on the root of a flake
This commit is contained in:
parent
4072024d79
commit
64a69b4054
3 changed files with 6 additions and 1 deletions
|
@ -1521,7 +1521,7 @@ static void prim_dirOf(EvalState & state, const PosIdx pos, Value * * args, Valu
|
|||
state.forceValue(*args[0], pos);
|
||||
if (args[0]->type() == nPath) {
|
||||
auto path = args[0]->path();
|
||||
v.mkPath(path.parent());
|
||||
v.mkPath(path.path.isRoot() ? path : path.parent());
|
||||
} else {
|
||||
auto path = state.coerceToString(pos, *args[0], context, false, false);
|
||||
auto dir = dirOf(*path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue