aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2018-08-13 11:27:35 +0200
committerLinus Heckemann <git@sphalerite.org>2018-08-13 11:27:35 +0200
commitd7402c9cd5c17644d73b2a7a39e10be22fffeb00 (patch)
treeb8dbb47c0a4396d3f8655f75a3efaa93a5aa98a0 /src/libexpr
parentf72c907ad833fa26800ad1694e63f3cec952b444 (diff)
dirOf: allow use on non-absolute paths
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/primops.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 8ace6db4d..32d6640fa 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -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);
}