about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libexpr/primops.cc2
-rw-r--r--tests/lang/eval-okay-context.nix2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 422ec971c9e0..6c30e6d549ec 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -710,7 +710,7 @@ static void prim_pathExists(EvalState & state, const Pos & pos, Value * * args,
 static void prim_baseNameOf(EvalState & state, const Pos & pos, Value * * args, Value & v)
 {
     PathSet context;
-    mkString(v, baseNameOf(state.coerceToString(pos, *args[0], context)), context);
+    mkString(v, baseNameOf(state.coerceToString(pos, *args[0], context, false, false)), context);
 }
 
 
diff --git a/tests/lang/eval-okay-context.nix b/tests/lang/eval-okay-context.nix
index 8cd8f2e131d8..7b9531cfe9e1 100644
--- a/tests/lang/eval-okay-context.nix
+++ b/tests/lang/eval-okay-context.nix
@@ -1,4 +1,4 @@
-let s = "foo ${builtins.substring 33 100 (baseNameOf ./eval-okay-context.nix)} bar";
+let s = "foo ${builtins.substring 33 100 (baseNameOf "${./eval-okay-context.nix}")} bar";
 in
   if s != "foo eval-okay-context.nix bar"
   then abort "context not discarded"