diff options
author | Jude Taylor <me@jude.bio> | 2015-10-21 14:40:35 -0700 |
---|---|---|
committer | Jude Taylor <me@jude.bio> | 2015-10-21 14:40:35 -0700 |
commit | af1218a86abf71595a54860b677dec30d1d53278 (patch) | |
tree | 2a0a9a260017d9f066a339fc23ea03fad0e4d831 /src/libutil | |
parent | 992cda1b113227cc6a4724e53ae2cb9f1e47be0e (diff) |
revert libutil change
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/util.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 178f78bde..11c75d2cd 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -167,11 +167,10 @@ string baseNameOf(const Path & path) bool isInDir(const Path & path, const Path & dir) { - return dir == "/" - || (path[0] == '/' - && string(path, 0, dir.size()) == dir - && path.size() >= dir.size() + 2 - && path[dir.size()] == '/'); + return path[0] == '/' + && string(path, 0, dir.size()) == dir + && path.size() >= dir.size() + 2 + && path[dir.size()] == '/'; } |