summaryrefslogtreecommitdiffstats
path: root/raul
diff options
context:
space:
mode:
Diffstat (limited to 'raul')
-rw-r--r--raul/Path.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/raul/Path.h b/raul/Path.h
index d4db163..e79e111 100644
--- a/raul/Path.h
+++ b/raul/Path.h
@@ -240,7 +240,11 @@ public:
inline bool is_child_of(const Path& parent) const
{
- return (length() > parent.length() && substr(0, parent.length()) == parent);
+ /*return (length() > parent.length()
+ && substr(0, parent.length()) == parent
+ && (*this)[parent.length()] == '/');*/
+ const string parent_base = parent.base();
+ return (substr(0, parent_base.length()) == parent_base);
}
inline bool is_parent_of(const Path& child) const