From be1961c9f8fbf71ab8ba7ba7a2da5dbb21be54b4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 17 Oct 2006 11:07:11 +0000 Subject: * toPath: should be the identity on paths. --- src/libexpr/primops.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/libexpr') 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); } -- cgit 1.4.1