* toPath: should be the identity on paths.

This commit is contained in:
Eelco Dolstra 2006-10-17 11:07:11 +00:00
parent cba913c521
commit be1961c9f8

View file

@ -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);
}