about summary refs log tree commit diff
path: root/src/libexpr
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2015-02-19T13·39-0500
committerShea Levy <shea@shealevy.com>2015-02-19T13·39-0500
commit4646e946100f103edd509a716b9c1a8849fc7895 (patch)
treec141502a76809f254fbc93a6c05d40f261176c3b /src/libexpr
parente0953d53de1dbb89ef0ff779e53ffdb0d988e806 (diff)
ExprConcatStrings: canonicalize concatenated paths
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/eval.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 298f6a3a60e3..95b56e84d89a 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -1174,7 +1174,8 @@ void ExprConcatStrings::eval(EvalState & state, Env & env, Value & v)
     else if (firstType == tPath) {
         if (!context.empty())
             throwEvalError("a string that refers to a store path cannot be appended to a path, at %1%", pos);
-        mkPath(v, s.str().c_str());
+        auto path = canonPath(s.str());
+        mkPath(v, path.c_str());
     } else
         mkString(v, s.str(), context);
 }