aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/types3
-rw-r--r--build2/variable.cxx9
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<abs_dir_path> 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<dir_path>::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));
}