diff options
Diffstat (limited to 'raul/Path.hpp')
-rw-r--r-- | raul/Path.hpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/raul/Path.hpp b/raul/Path.hpp index 05fb029..867e2e3 100644 --- a/raul/Path.hpp +++ b/raul/Path.hpp @@ -198,10 +198,7 @@ public: /** Return true iff @p child is equal to, or a descendant of @p parent. */ static inline bool descendant_comparator(const Path& parent, const Path& child) { - return (child == parent || - (child.length() > parent.length() && - (!parent.compare(0, parent.length(), child, 0, parent.length()) - && (parent.is_root() || child[parent.length()] == '/')))); + return (child == parent || child.is_child_of(parent)); } }; |