aboutsummaryrefslogtreecommitdiff
path: root/build/path.txx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-03-25 14:48:36 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-03-25 14:48:36 +0200
commitcd75e06a87aa74aa6968113107afa53d401d20bc (patch)
tree1e104829d10f375a783d6efbbf7eef3e2c6d2ef5 /build/path.txx
parenta94dcda7f00b10cb22b5f2138b1c29bcfbe7de37 (diff)
Configure/disfigure src_root saving/removing support; fsdir{} injection
We can now build out-of-tree.
Diffstat (limited to 'build/path.txx')
-rw-r--r--build/path.txx12
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.