diff options
Diffstat (limited to 'build/path.txx')
-rw-r--r-- | build/path.txx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/build/path.txx b/build/path.txx index 5fbabbd..a8bf859 100644 --- a/build/path.txx +++ b/build/path.txx @@ -84,11 +84,11 @@ namespace build if (n == 0) return *this; - size_type m (path_.size ()); - - if (m < n || path_.compare (0, n, d.path_) != 0) + if (!sub (d)) throw invalid_basic_path<C> (path_); + size_type m (path_.size ()); + if (n != m #ifndef _WIN32 && !d.root () @@ -108,11 +108,11 @@ namespace build if (n == 0) return *this; - size_type m (path_.size ()); - - if (m < n || path_.compare (m - n, n, l.path_) != 0) + if (!sup (l)) throw invalid_basic_path<C> (path_); + size_type m (path_.size ()); + if (n != m) n++; // Skip the directory separator. |