aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/parser.cxx4
-rw-r--r--build2/utility.cxx4
-rw-r--r--old-tests/parser/driver.cxx2
3 files changed, 5 insertions, 5 deletions
diff --git a/build2/parser.cxx b/build2/parser.cxx
index c47cc8b..6b5708e 100644
--- a/build2/parser.cxx
+++ b/build2/parser.cxx
@@ -40,7 +40,7 @@ namespace build2
{
// Relative scopes are opened relative to out, not src.
//
- if (d.simple () && d.string () != "." && d.string () != "..")
+ if (d.simple () && !d.current () && !d.parent ())
{
d = dir_path (p.scope_->out_path ()) /= d.string ();
n = false;
@@ -1797,7 +1797,7 @@ namespace build2
{
q = pp ? true : convert<bool> (move (lhs));
}
- catch (const invalid_argument& e) { fail (l) << e.what (); }
+ catch (const invalid_argument& e) { fail (l) << e.what () << endf; }
if (!pp)
pre_parse_ = !q; // Short-circuit middle?
diff --git a/build2/utility.cxx b/build2/utility.cxx
index e4b5254..13ddd0b 100644
--- a/build2/utility.cxx
+++ b/build2/utility.cxx
@@ -523,7 +523,7 @@ namespace build2
// Figure out work and home directories.
//
- work = dir_path::current ();
- home = dir_path::home ();
+ work = dir_path::current_directory ();
+ home = dir_path::home_directory ();
}
}
diff --git a/old-tests/parser/driver.cxx b/old-tests/parser/driver.cxx
index 7c73937..af50bd9 100644
--- a/old-tests/parser/driver.cxx
+++ b/old-tests/parser/driver.cxx
@@ -143,7 +143,7 @@ parse (const char* s)
// Create a minimal root scope.
//
- auto i (scopes.insert (path::current (), nullptr, true, true));
+ auto i (scopes.insert (path::current_directory (), nullptr, true, true));
scope& root (*i->second);
root.src_path_ = root.out_path_ = &i->first;