diff options
Diffstat (limited to 'build2/dump.cxx')
-rw-r--r-- | build2/dump.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
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; |