diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2025-01-03 12:01:53 +0200 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2025-01-03 15:06:30 +0200 |
commit | 8723e8bb02d3d14a4ecb0349c17af37e936c0528 (patch) | |
tree | ff2ee2132303d1678227d3db3cd85458403bad11 /libbuild2/parser.cxx | |
parent | 8d5e1676c2362d8f03c6c39bf814518428d1c081 (diff) |
Fix name pattern expansion for absolute path patterns (GH issue #453)
Diffstat (limited to 'libbuild2/parser.cxx')
-rw-r--r-- | libbuild2/parser.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libbuild2/parser.cxx b/libbuild2/parser.cxx index 1e2f209..578d3dd 100644 --- a/libbuild2/parser.cxx +++ b/libbuild2/parser.cxx @@ -7258,7 +7258,9 @@ namespace build2 (root_ != nullptr && root_->root_extra != nullptr && m.to_directory () && - exists (d.sp / m / root_->root_extra->buildignore_file))) + exists (m.relative () + ? d.sp / m / root_->root_extra->buildignore_file + : m / root_->root_extra->buildignore_file))) return !interm; // Note that we have to make copies of the extension since there will @@ -7314,9 +7316,11 @@ namespace build2 return true; }); + path pat (move (p)); + try { - path_search (path (move (p)), + path_search (pat, process, *sp, path_match_flags::follow_symlinks, @@ -7324,7 +7328,8 @@ namespace build2 } catch (const system_error& e) { - fail (l) << "unable to scan " << *sp << ": " << e; + fail (l) << "unable to scan for '" + << (pat.relative () ? *sp / pat : pat) << "': " << e; } }; |