From ce030e8bf6a8f278eb3a571aef0f0df18875daa7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 23 Aug 2016 08:43:06 +0200 Subject: Don't complete empty abs_dir_path The empty value is used as a special indicator --- build2/types | 3 ++- build2/variable.cxx | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/build2/types b/build2/types index df54860..c90b779 100644 --- a/build2/types +++ b/build2/types @@ -91,7 +91,8 @@ namespace build2 // a (variable) value of this type gets initialized from untyped names. See // value_type for details. // - // Note that currently we also normalize and actualize the path. + // Note that currently we also normalize and actualize the path. And we + // leave empty path as is. // struct abs_dir_path: dir_path { diff --git a/build2/variable.cxx b/build2/variable.cxx index 54b61b7..7a13618 100644 --- a/build2/variable.cxx +++ b/build2/variable.cxx @@ -598,10 +598,13 @@ namespace build2 { dir_path d (value_traits::convert (move (n), r)); - if (d.relative ()) - d.complete (); + if (!d.empty ()) + { + if (d.relative ()) + d.complete (); - d.normalize (true); // Actualize. + d.normalize (true); // Actualize. + } return abs_dir_path (move (d)); } -- cgit v1.1