aboutsummaryrefslogtreecommitdiff
path: root/build2/parser.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-12-02 01:24:02 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-12-05 17:21:48 +0300
commitd04cd568c85262d486f7a0de0a374c80d466c58e (patch)
treef69056aa0d98299807ee53fa891d8775d41f9f26 /build2/parser.cxx
parent26bdc152246f6a1caf1f0667b5f04f1804d599fa (diff)
Use empty path for root scope
Diffstat (limited to 'build2/parser.cxx')
-rw-r--r--build2/parser.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/build2/parser.cxx b/build2/parser.cxx
index 2776020..1d2766c 100644
--- a/build2/parser.cxx
+++ b/build2/parser.cxx
@@ -24,7 +24,7 @@ namespace build2
{
using type = token_type;
- static const dir_path root_dir ("/");
+ static const dir_path root_dir;
class parser::enter_scope
{
@@ -33,11 +33,8 @@ namespace build2
enter_scope (parser& p, dir_path&& d): p_ (&p), r_ (p.root_), s_ (p.scope_)
{
- // Check for the global scope as a special case. While on POSIX the
- // check is redundant, on Windows the path completion/normalization
- // would otherwise transform it to the out path of the current scope
- // since "/" is a relative path on Windows (and we use "/" even on
- // Windows for that gloabl scope).
+ // Check for the global scope as a special case. Note that the global
+ // scope (empty) path is a prefix for any other scope path.
//
if (d != root_dir)
{