revert libutil change
This commit is contained in:
parent
992cda1b11
commit
af1218a86a
1 changed files with 4 additions and 5 deletions
|
@ -167,11 +167,10 @@ string baseNameOf(const Path & path)
|
||||||
|
|
||||||
bool isInDir(const Path & path, const Path & dir)
|
bool isInDir(const Path & path, const Path & dir)
|
||||||
{
|
{
|
||||||
return dir == "/"
|
return path[0] == '/'
|
||||||
|| (path[0] == '/'
|
|
||||||
&& string(path, 0, dir.size()) == dir
|
&& string(path, 0, dir.size()) == dir
|
||||||
&& path.size() >= dir.size() + 2
|
&& path.size() >= dir.size() + 2
|
||||||
&& path[dir.size()] == '/');
|
&& path[dir.size()] == '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue