about summary refs log tree commit diff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-11-15T22·04+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-11-15T22·04+0100
commit17dc306aa32c48dcde6bfc12ad5e4b48f6b88974 (patch)
tree09737dc832ac0c2174b396f37969c0d96077475b /src/libexpr/primops.cc
parentf794465ca8bd2a8d41ee3b6928db5fb1479dc96d (diff)
Revert "prim_toPath: Actually make the string a path"
This reverts commit 2980d1fba97069805c3649c5d99d0356bce6c303.  It
causes a regression in NixOS evaluation:

string `/nix/store/ya3s5gmj3b28170fpbjhgsk8wzymkpa1-pommed-1.39/etc/pommed.conf' cannot refer to other paths
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r--src/libexpr/primops.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 409e6256b5..509297003f 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -517,9 +517,7 @@ static void prim_toPath(EvalState & state, Value * * args, Value & v)
 {
     PathSet context;
     Path path = state.coerceToPath(*args[0], context);
-    if (!context.empty())
-        throw EvalError(format("string `%1%' cannot refer to other paths") % path);
-    mkPath(v, canonPath(path).c_str());
+    mkString(v, canonPath(path), context);
 }