From d04cd568c85262d486f7a0de0a374c80d466c58e Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 2 Dec 2016 01:24:02 +0300 Subject: Use empty path for root scope --- build2/dump.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'build2/dump.cxx') diff --git a/build2/dump.cxx b/build2/dump.cxx index 9c26235..b959d9d 100644 --- a/build2/dump.cxx +++ b/build2/dump.cxx @@ -260,12 +260,17 @@ namespace build2 const dir_path& d (i->first); ++i; - // We don't want the extra notations (e.g., ~/) provided by - // diag_relative() since we want the path to be relative to - // the outer scope. + // We don't want the extra notations (e.g., ~/) provided by diag_relative() + // since we want the path to be relative to the outer scope. Print the root + // scope path (represented by an empty one) as a platform-dependent path + // separator. // - os << ind << relative (d) << ":" << endl - << ind << '{'; + if (d.empty ()) + os << ind << dir_path::traits::directory_separator; + else + os << ind << relative (d); + + os << ":" << endl << ind << '{'; const dir_path* orb (relative_base); relative_base = &d; -- cgit v1.1