aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-09-27 15:11:09 +0300
committerBoris Kolpackov <boris@codesynthesis.com>2022-09-27 14:31:22 +0200
commit4ef4820f0f8537bd2f3b59948f5b79a0060398e3 (patch)
tree28c392026b94b860f956fccbcc047118d8764856
parent54390cf8ebc17eaebb2f053c5b62ba91bf1b4d7b (diff)
Fix bug in handling of name patterns with trailing dot
-rw-r--r--libbuild2/parser.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/libbuild2/parser.cxx b/libbuild2/parser.cxx
index e21fc8d..45b8cdd 100644
--- a/libbuild2/parser.cxx
+++ b/libbuild2/parser.cxx
@@ -5910,7 +5910,13 @@ namespace build2
// multiple entries for each pattern.
//
if (!interm)
- d.appf (move (m).representation (), optional<string> (d.e));
+ {
+ // If the extension is empty (meaning there should be no extension,
+ // for example hxx{Q*.}), skip entries with extensions.
+ //
+ if (!d.e || !d.e->empty () || m.extension_cstring () == nullptr)
+ d.appf (move (m).representation (), optional<string> (d.e));
+ }
return true;
};
@@ -6085,6 +6091,7 @@ namespace build2
if ((n.pair & 0x02) != 0)
{
e = move (n.type);
+ n.type.clear ();
// Remove non-empty extension from the name (it got to be there, see
// above).