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

dirOf: allow use on non-absolute paths

This commit is contained in:
Linus Heckemann 2018-08-13 11:27:35 +02:00
parent f72c907ad8
commit d7402c9cd5
2 changed files with 2 additions and 2 deletions

View file

@ -866,7 +866,7 @@ static void prim_baseNameOf(EvalState & state, const Pos & pos, Value * * args,
static void prim_dirOf(EvalState & state, const Pos & pos, Value * * args, Value & v)
{
PathSet context;
Path dir = dirOf(state.coerceToPath(pos, *args[0], context));
Path dir = dirOf(state.coerceToString(pos, *args[0], context, false, false));
if (args[0]->type == tPath) mkPath(v, dir.c_str()); else mkString(v, dir, context);
}