From 17dc306aa32c48dcde6bfc12ad5e4b48f6b88974 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 15 Nov 2012 23:04:34 +0100 Subject: [PATCH] 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 --- src/libexpr/primops.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 409e6256b..509297003 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); }