about summary refs log tree commit diff
diff options
context:
space:
mode:
-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 e6c3958d34c4..19d23392216c 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -311,7 +311,7 @@ static Expr primDerivationLazy(EvalState & state, const ATermVector & args)
 static Expr primBaseNameOf(EvalState & state, const ATermVector & args)
 {
     PathSet context;
-    return makeStr(baseNameOf(coerceToPath(state, args[0], context)), context);
+    return makeStr(baseNameOf(coerceToString(state, args[0], context)), context);
 }