mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
* Handle the case where the search path element is a regular file.
This commit is contained in:
parent
00a724ebc6
commit
9d091ee99a
1 changed files with 2 additions and 1 deletions
|
@ -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