From 293aed4d3b9bafd0ffb30de095ab955615434e67 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 10 Jan 2024 11:02:33 +0200 Subject: Fix abs_dir_path conversion diagnostics --- libbuild2/variable.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libbuild2') diff --git a/libbuild2/variable.cxx b/libbuild2/variable.cxx index 8c52e22..392c9bb 100644 --- a/libbuild2/variable.cxx +++ b/libbuild2/variable.cxx @@ -877,7 +877,14 @@ namespace build2 return abs_dir_path (move (d)); } - catch (const invalid_path&) {} // Fall through. + catch (invalid_path& e) + { + // We moved from name so reconstruct the path. Let's always make it + // simple since we may not be able to construct dir_path. Should be + // good enough for diagnostics. + // + n.value = move (e.path); + } } throw_invalid_argument (n, r, "abs_dir_path"); -- cgit v1.1