about summary refs log tree commit diff
path: root/src/libutil/util.cc
diff options
context:
space:
mode:
authorJude Taylor <me@jude.bio>2015-10-21T21·40-0700
committerJude Taylor <me@jude.bio>2015-10-21T21·40-0700
commitaf1218a86abf71595a54860b677dec30d1d53278 (patch)
tree2a0a9a260017d9f066a339fc23ea03fad0e4d831 /src/libutil/util.cc
parent992cda1b113227cc6a4724e53ae2cb9f1e47be0e (diff)
revert libutil change
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r--src/libutil/util.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 178f78bde6da..11c75d2cda4c 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()] == '/';
 }