forked from lix-project/lix
* Handle the case where the search path element is a regular file.
This commit is contained in:
parent
00a724ebc6
commit
9d091ee99a
|
@ -558,7 +558,8 @@ Path EvalState::findFile(const string & path)
|
||||||
if (path.compare(0, i->first.size(), i->first) != 0 ||
|
if (path.compare(0, i->first.size(), i->first) != 0 ||
|
||||||
(path.size() > i->first.size() && path[i->first.size()] != '/'))
|
(path.size() > i->first.size() && path[i->first.size()] != '/'))
|
||||||
continue;
|
continue;
|
||||||
res = i->second + "/" + string(path, i->first.size());
|
res = i->second +
|
||||||
|
(path.size() == i->first.size() ? "" : "/" + string(path, i->first.size()));
|
||||||
}
|
}
|
||||||
if (pathExists(res)) return canonPath(res);
|
if (pathExists(res)) return canonPath(res);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue