diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index d44ec53c4..2c2950471 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -2078,7 +2078,7 @@ void ExprConcatStrings::eval(EvalState & state, Env & env, Value & v) else if (firstType == nFloat) v.mkFloat(nf); else if (firstType == nPath) { - if (!context.empty()) + if (hasContext(context)) state.error("a string that refers to a store path cannot be appended to a path").atPos(pos).withFrame(env, *this).debugThrow(); v.mkPath(state.rootPath(CanonPath(str()))); } else