aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sdn.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/sdn.cpp b/sdn.cpp
index 13e2f0e..b56d458 100644
--- a/sdn.cpp
+++ b/sdn.cpp
@@ -779,8 +779,7 @@ fun search (const wstring &needle) {
fun is_ancestor_dir (const string &ancestor, const string &of) -> bool {
if (strncmp (ancestor.c_str (), of.c_str (), ancestor.length ()))
return false;
- return of.c_str ()[ancestor.length ()] == '/'
- || (ancestor == "/" && ancestor != of);
+ return of[ancestor.length ()] == '/' || (ancestor == "/" && ancestor != of);
}
fun change_dir (const string &path) {