forked from lix-project/lix
* toPath: should be the identity on paths.
This commit is contained in:
parent
cba913c521
commit
be1961c9f8
|
@ -343,9 +343,7 @@ static Expr primToString(EvalState & state, const ATermVector & args)
|
||||||
static Expr primToPath(EvalState & state, const ATermVector & args)
|
static Expr primToPath(EvalState & state, const ATermVector & args)
|
||||||
{
|
{
|
||||||
PathSet context;
|
PathSet context;
|
||||||
string path = evalString(state, args[0], context);
|
string path = coerceToPath(state, args[0], context);
|
||||||
if (path == "" || path[0] != '/')
|
|
||||||
throw EvalError("string doesn't represent an absolute path in `toPath'");
|
|
||||||
return makeStr(canonPath(path), context);
|
return makeStr(canonPath(path), context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue