From 4ef4820f0f8537bd2f3b59948f5b79a0060398e3 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 27 Sep 2022 15:11:09 +0300 Subject: Fix bug in handling of name patterns with trailing dot --- libbuild2/parser.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libbuild2/parser.cxx') 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 (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 (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). -- cgit v1.1