From af1218a86abf71595a54860b677dec30d1d53278 Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Wed, 21 Oct 2015 14:40:35 -0700 Subject: [PATCH] revert libutil change --- src/libutil/util.cc | 9 ++++----- 1 file 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()] == '/'; }