about summary refs log tree commit diff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-10-17T11·07+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-10-17T11·07+0000
commitbe1961c9f8fbf71ab8ba7ba7a2da5dbb21be54b4 (patch)
tree8a07903dab2da1f6780a3a77daee4087e548a883 /src/libexpr/primops.cc
parentcba913c5217fd4071419279da81fd02599715b6a (diff)
* toPath: should be the identity on 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 6b4858d800f1..e6c3958d34c4 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -343,9 +343,7 @@ static Expr primToString(EvalState & state, const ATermVector & args)
 static Expr primToPath(EvalState & state, const ATermVector & args)
 {
     PathSet context;
-    string path = evalString(state, args[0], context);
-    if (path == "" || path[0] != '/')
-        throw EvalError("string doesn't represent an absolute path in `toPath'");
+    string path = coerceToPath(state, args[0], context);
     return makeStr(canonPath(path), context);
 }