aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-08-23 08:43:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-08-23 08:43:06 +0200
commitce030e8bf6a8f278eb3a571aef0f0df18875daa7 (patch)
tree6a04f521504e99f23643ab4939753bced00a734a
parent2064cf0cb165c78f79aed53edc728d38bb83c0a0 (diff)
Don't complete empty abs_dir_path
The empty value is used as a special indicator
-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));
}